Actor

From EDukeWiki
Revision as of 18:16, 28 February 2011 by DeeperThought (talk | contribs)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

actor <name> <strength> <action> <move> <ai> { actor code } enda

<name> is the name/tile of the actor. You can either input a defined name, or the tile number directly.

<strength> is the health of the actor.

<action> is the intial action an actor uses (optional).

<move> is the initial move of the actor (optional).

<ai> is the actor's initial ai routine (optional).

{ actor code } is the code for the actor.

enda ends an actor.


Loosely speaking, actors are sprites that run code in game, such as enemies and breakable props. More precisely, an actor is a sprite with a statnum of 1. Sprites with that statnum will execute their actor code once every game tic. Prior to version 1.4, only the tile numbers hardcoded to be actors could be actors. In the GAME.CON script file, they were designated by the actor command.

Version 1.4 introduced the useractor syntax which allows use of any tile number as an actor.


Example actor:

define SOMEACTOR 3585

actor SOMEACTOR 0
ifpdistl 1024 
{ 
    palfrom 32 0 16 0 
}
enda