Zot-Helper
   Your Zot engine information site!


 
Zot-Helper
NAVIGATION
Home
The Basics
Commands
Functions
Animations
Triggers
Zot Theory






    

Engine Variables     A-E      F-J     K-O     P-T     U-Z



Commands and Inputs

Though Skeezix has a list of his own on his site, it's a bit scattered.  I've clumped them here for ease of looking up.  They're listed alphabetically on the left, then explained on the right and an example of its syntax given.  Commands marked with a * have a more detailed explaination at the end of the section, such as a list of variables or options.

Color key: command argument1 argument2



Engine Variables

Zot engine variables are hard-coded into the engine by Skeezix himself, and are very helpful, multipurpose variables that can't be altered.  All of these start with an underscore ( _ ) in their name, so don't name your own variables like that or doom will befall you!

Some small notes, if the variable involves VELOCITY, then the line "option     velocity" must be in the sprite's definition to use them.  You CAN have some sprites use velocity and some not. :)

 _player_dirmask

 You can use a bit value here to disable inputs from the player, such as certain buttons.  The bithash you enter ALLOWS those keys, it does not turn them off.  Here is Skeezix's guide:

left=1, right=2, up=4, down=8, fire=16, action=32

So, if you don't want or need say the down button, add all of them up except down and you get your bithash, 55.  Leaving it out altogether defaults the hex number "3F" which is all enabled.

_player_dirmask 55

 _player_movevelocity

 Skeezix describes this as "thrust".  It's how much power your character uses to move, the higher it is the more immediate and powerful your movement is, and the faster you gain momentum!

_player_movevelocity 5

 _player_jumpvelocity_y

 Thrust under your jump (UP button).  Be M.J. with a higher value, but remember it fights back and forth with gravity!

_player_jumpvelocity_y 3

 _player_speed

 This is the player's base speed, not related to velocity.  You can add and subtract to or from it for triggers that slow you down and such.

_player_speed 1

 _player_x/y

 Teleports the player, use with discretion as evil things happen when you teleport into another sprite...(x,y) coords of destination required.

_player_x 3,5

 _ticks_since_begin

 Amount of time since the game was started, can be used for events that happen every so often, or a game clock maybe?

_ticks_since_begin 10

 _world_friction_x/y

 Sets how quickly the momentum of a moving sprite dissipates when it stops moving.  X is normal friction axis, Y would be more for a space fighter type game that involves moving up and down.

_world_friction_x 10

 _world_gravity_y/x

 Yep, just gravity.  Y is normal, sidescroller, verticle gravity, and X could be used for wind pushing your character back for instance.  These CAN be negetive, to push you up or forward rather than downward or backward!

_world_gravity_y 7



A-E

 ai*

 Tells Zot which AI your sprite uses.  Begins with mob_ unless specified.

ai     wander

 ainear

 Same idea as ai, except the sprite uses this when it gets close to the player.  Same arguments.

ainear     flee

 angles

 Sets how many angles it generates for vector movement.  4-32.  (as of now, doing a complete 360 degree spin crashes the game, as it does not know to go from the last one back to 1)

anim_statedef     angles     32

 anim_statedef

 Tells the engine which state it's animating.

up, upright, right, downright, down, downleft, left, upleft, still, inactive, dead.

anim_statedef     right     bounce

 anim_steps

 Tells the engine how many frames it's animating to, can be any amount.  (I've used up to 9 with no problems)

anim_steps     9

 avatar-image

 When using a dialogue window, the image displayed. (Showing who is talking)

avatar-image     portrait     #taken from image-list!

 avatar-name

 An optional subtitle with the name of the sprite as specified in "name".

avatar-name     enemy1    #displays the "name" line of sprite "enemy1"

 action and action-group

 These are special commands, which are used with the following inputs:

goto-text, post-message, end-dialog, end-game, kill, variable-, trigger-change, make-sprite, goto-floor

When you use "action" as a command, you follow it with one of the above inputs.  HOWEVER!  If you use action-group, you list the inputs to be executed.

action     kill     enemy1

action-group
kill     enemy1
variable-add     myscore     10
action-group    end

 button

 Defines a button tile, followed by anim_statedefs.

button     button1     #starts the block and names it, like tiles do.

 charmap

 Tells the engine which characters to match up with what artwork segment.  Enter a string of text characters, in the same order as your font artwork.

charmap     "ABCDEFG..."

 char_offset_x/y

 Spacing (pixels) between characters (segments of artwork) in the font art.

 x for horizontal offset, y for verticle offset.

char_offset_x     16     #16 pixel wide letter

 end-dialog

 Closes the current dialog, no argument, is set up like this:

"Choice on the menu"     end-dialog    (Hitting ACTION on the option given makes it end the dialog.)

 end-game

 Ends the game, no argument.  For instance, use a when-collide trigger to end-game.

end-game

 exit-state

 State to go to after the current one for a button, conveyor etc.  Supply state from tile states. (alpha, beta, delta, sigma)

exit-state     beta

* More on AI types:

mob_arrow - Travels in a straight line until it collides with an impassable.

nil - Does nothing on its own, like an idle passerby or a column, tree etc.

player - The player, duh!  Player sprite MUST have this.

mob_robotron - When the player comes in range, the AI chases him down until it makes contact.  (Works best with when-collide triggers for damage!)

mob_flee - Runs away from the player when he comes in range.

mob_wander - AI wanders around its spawn.

mob_bounce - Same as mob_arrow, but ricochets off of impassables.

mob_animonce - Performs an animation one time and removes itself.  Mines, booby traps.

mob_generator - Spawns a specified sprite near it at a specified incriment.  Like a robot factory spitting out enemy robots.

mob_gaurd - The entity gaurds its spawn point until an enemy comes within ainear range.



F-J

 flip_x/y

 Used with an image-list entry, after the name and art you put flip_x to flip the X Axis (flip horizontally), and flip_y to flip the Y Axis (flip vertically).

floor     tile.pcx     flip_x

 font  Begins a font-block, where you put in offsets and artwork for later use in text.

 goto-floor

 Triggers a change of floors, or levels.  Specify the floor ID.

goto-floor     level2

 goto-text

 Sends you to a dialog text menu.  Specify the ID of the desired dialog.

goto-text     shopowner

 height

 Height in pixels of the sprite's body.  Also for tilemaps the height in tiles of the level.

height     72

 image

 Artwork file to use for your sprite or tile.

image     brick

 image_list  Starts the block that holds all of the image info.
 image_height

 Height of the actual image you're using. (You can use it to stretch)

image_height     90     #if the image is only 72 tall, it will stretch

 image_width

 Width of the image.

image_width     50     #if it is only 40 wide, it will stretch

 inactive

 Specifys the amount of time to wait before the inactive animstate plays.

inactive     100     #1 second



K-O

 kern_offset_x/y

 Sets the spacing between characters in a font when they're drawn on the screen.  X is spacing between letters in a word, Y is spacing between lines.

kern_offset_x     2    #2 pixels between letters

 kill

 Used in a trigger if a variable becomes less than 0, to kill a sprite.

kill     enemy1

 make-sprite

Use (x,y) coords to spawn at a tile, or _from or _into and an existing sprite name to spawn near it.

make-sprite     enemy2     _from.enemy1

make-sprite     enemy2     1,4

 name

 A sprite's name, only used for a handful of things, such as a name display in dialog or a make-sprite _from "name" type trigger.

name     Joe     #in avatar-name, shows "Joe" instead of, say shopkeeper.

 near

 Tells the engine how many tiles away "near" is, so certain AI types can work at attacking the player.

near     5

 option*

 Specifies various modifiers for sprites, tiles and the like.

option     impassable

 on-player-entry

 When the player enters this tile (x,y), a trigger fires.

on-player-entry     3 5

 on-floor

 Only happens if the player is on this floor (level).

on-floor     player

 on-variable-*  Various variable-logic inputs, see the list at the end of this section.
 on-no-sprite

 Trigger fires when none of the given sprites exist on the given floor.

on-no-sprite     boss    #when the boss dies, changes level.

 on-pickup-sprite

 Trigger fires when the player picks up the given sprite.

on-pickup-sprite     key

*More on options:

Sprite options:

     pushable - Must be impassable, if another impassable sprite rams it, it will move.

     impassable - You can't walk over this type of sprite, but airborne sprites fly over them.

     carryable - Can be added into inventory, for keys and powerups.

     indestructable - Cannot be destroyed by the player's shots.

     airborne - Flies, ie is not affected by anything underneath it, like moving tiles.

     ethereal - Remember NOCLIP mode?  It can pass through any sprite or tile that's not impassable.

     nostill - The sprite's animation won't return to the "still" state, but will keep looping the last played animation.

Tile options:

     impassable - You can't move through these tiles, like walls and solid architechture.

     impassable_up - Use up, down, left, and right to specify specific directions you can't enter the tile from.  Remember those pipes in Mario?

     autotile - Basically, this nifty contraption slices and dices a large artwork file (currently up to 256x256, though Skeezix is updating it to allow more) into a gazillion little 16x16 tiles to use on the tilemap SO YOU DON'T HAVE TO!  Just use the tile, followed by < for horizontal and ^ for verticle autotiling.  If you have a 64x16 block, you'd use this: ,<<<  To repeat the same art twice, you'd do ,<<<,<<< etc.  Add a row of ^^^^^^^^ under that to tile down.  This should ALWAYS be done LEFT to RIGHT, TOP to BOTTOM!

Trigger options:

     continuous - Once the trigger fires, it will keep doing so until you tell it to stop, or it is removed.  Skeezix's example was damage over time traps, mine is a hot floor or drowning.

     disabled - Temporarily or permanently disables the trigger.  If you need it later you can undo this to use the trigger again, very handy.

     onceonly - The trigger will fire one time only, so it is not re-triggered over and over.  Like a help dialog to tell you a building is a shop when you enter it, but not every time you enter.



P-T

 post-message

 Simple, yet elegant way to post a message centerprinted across the screen.  Argument is the string in quotes.  You can use variables also, those start with $.

post-message     "Welcome to Zot-Helper!" or if var1 is set to say Whee!, "$var1" would say Whee!.

 speed

 How fast this sprite moves in relation to everything else.  1 is normal, 2 is twice as fact...etc.

speed     2

 sprite  Starts a sprite-block, which includes properties, options, artwork and animations.
 start-direction

 Tells AI controlled sprites which direction it's going.  Skeezix suggests mob_bounce can use this, as it would need to know it's going right for instance, to bounce back.

start-direction     right

 startmap  

 This states the map/level/floor you're beginning on when you fire up Zot.

startmap     level1

 score         

 Followed by the variable name you've set for the score.  If you set a variable to zero and add some points to it for each enemy killed, then put the name of that here, you'll get a neat little score counter at the top of the screen.

score     myscore

 text-menu

 Opens a text-menu, or dialog box.

text-menu     talk_to_joe

 tile

 Starts a tile block, followed by the character that represents this tile in the tilemap, then the name of the tile, image, and any options you use.

tile          /
name      wall
image     wall
option     impassable
tile          end

 tilemap

 This is the big chunk of characters that makes a level, made from defined tiles.

tilemap     level1
height       5
width        10
row           //////////
row           //////////
row           //////////
row           //////////
row           //////////
tilemap     end

 trigger*

 A trigger does something when something happens, like a relay.  There are a bunch of trigger conditions and such at the end of this section.

trigger     *
when-collide     player     enemy1
action     kill     player
trigger    end

*More on triggers:  The types of trigger conditions, or on- statements, are listed under O, at the end they are explained individually.

Events:  Also note there are a seperate type of ingame triggers called events.  These are performed while you play, real time.  Unlike triggers, which are plotted to happen, these happen when they happen in the game, like contact between sprites.  Triggers are called ON-STATEMENTS, and events are called WHEN-STATEMENTS.

when-collide - This is what fires when sprites hit each other.  Remember, contact can't be plotted like a trigger, therefore it's an event.  Requires two sprite names.

  • when-collide player enemy1

when-dies - Fires an action when a specified enemy dies, not the player mind you!  Requires the name of a sprite.

  • when-dies enemy1

when-ltezero - Fires an action when a value in a variable hits 0 or drops below it.  Think of player or enemy health.  Requires the name of the affected sprite and variable.

  • when-ltezero player health

    



Sponsors


U-Z

 variable-add

 Adds an amount to a specified variable, you supply the variable and what to add to it.

variable-add     myscore     10

 variable-set

 Same as -add, but sets the variable you give to the amount you give, rather than do math with it.

variable-set     myscore     0

 variable-sub

 Same as -add, but with subtraction.  Normally uses _from.variable argument though.

variable-sub     _from.myhealth

 width

 Specifies the width of a sprite or tilemap.

width    10



 


Zot is © Jeff Mitchell


Create a free website at Webs.com