Actor: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
'''actor''' <name> <strength> <action> <move> <ai> { actor code } [[enda]] | |||
actor <name> <strength> <action> <move> <ai> { actor code } [[enda]] | |||
An actor is any sprite with programming applied to it. The original actors were defined that way. | |||
This syntax can only be used on tile numbers that were hardcoded as types of actors in the game. 1.4 intorduced the [[useractor]] syntax which allows use of any tile number as an actor. | This syntax can only be used on tile numbers that were hardcoded as types of actors in the game. 1.4 intorduced the [[useractor]] syntax which allows use of any tile number as an actor. | ||
Line 15: | Line 14: | ||
<ai> is the actor's initial [[ai]] routine (optional). | <ai> is the actor's initial [[ai]] routine (optional). | ||
{ actor code } is | { actor code } is the code for the actor. | ||
[[enda]] ends an actor. | [[enda]] ends an actor. | ||
Example actor: | Example actor: | ||
define SOMEACTOR 3585 | |||
define SOMEACTOR 3585 | '''actor''' SOMEACTOR 0 | ||
ifpdistl 1024 | |||
actor SOMEACTOR 0 | { | ||
ifpdistl 1024 | palfrom 32 0 16 0 | ||
{ | } | ||
enda | |||
} | |||
enda | |||
[[Category:Duke3D 1.3/1.5 commands]] | [[Category:Duke3D 1.3/1.5 commands]] | ||
[[Category:Sprite manipulation]] | [[Category:Sprite manipulation]] |
Revision as of 10:41, 4 May 2009
actor <name> <strength> <action> <move> <ai> { actor code } enda
An actor is any sprite with programming applied to it. The original actors were defined that way. This syntax can only be used on tile numbers that were hardcoded as types of actors in the game. 1.4 intorduced the useractor syntax which allows use of any tile number as an actor.
<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.
Example actor:
define SOMEACTOR 3585 actor SOMEACTOR 0 ifpdistl 1024 { palfrom 32 0 16 0 } enda