Useractor: Difference between revisions
mNo edit summary |
Mblackwell (talk | contribs) mNo edit summary |
||
Line 1: | Line 1: | ||
Similar to [[actor]]. This defines a new [[actor]] in a slightly more specific manner, and it does so without restraining the amount of [[define]]d [[actor]]s. Version 1.3D only allowed so many [[actor]]s so to add a new one required replacing another. Version 1.5 remedied this with useractor. | Similar to [[actor]]. This defines a new [[actor]] in a slightly more specific manner, and it does so without restraining the amount of [[define]]d [[actor]]s. Version 1.3D only allowed so many [[actor]]s so to add a new one required replacing another. Version 1.5 remedied this with useractor. | ||
useractor <actortype> <name> <strength> <action> <move> <ai> { actor code } enda | useractor <actortype> <name> <strength> <action> <move> <ai> { actor code } [[enda]] | ||
<actortype> can either be "enemy," "enemystayput," or "notenemy." These terms are defined in DEFS.CON as: | |||
:[[define]] notenemy 0 | |||
:[[define]] enemy 1 | |||
:[[define]] enemystayput 2 | |||
*The "enemy" type makes an [[actor]] that is intended to be used as a character who commences actions on player sight. | *The "enemy" type makes an [[actor]] that is intended to be used as a character who commences actions on player sight. | ||
*The "enemystayput" works the same as "enemy," except that the [[actor]] will not leave the sector it is placed in. | *The "enemystayput" works the same as "enemy," except that the [[actor]] will not leave the [[sector]] it is placed in. | ||
*The "notenemy" type | *The "notenemy" type was primarily intended to make an [[actor]] that is a decoration or otherwise not a threat to the player. This type of [[actor]] will have no shadow by default, and it will not be targeted if autoaim is enabled. [[Actor]]s using the "notenemy" flag have their code executed at startup. This is extremely useful for coding enemies, as this allows for extended function, and has less quirks than using "enemy" or "enemystayput". A shadow may be applied in Eduke32 using the [[spriteshadow]] command. This is typically used for all new [[actor]]s you may code. | ||
<name> is the name/tile of the [[actor]]. You can either input a defined name, or the tile number directly. | <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]]. | <strength> is the health of the [[actor]]. Also see [[strength]]. | ||
<action> is the intial [[action]] an [[actor]] uses (optional). | <action> is the intial [[action]] an [[actor]] uses (optional). | ||
Line 18: | Line 23: | ||
<ai> is the actor's initial [[ai]] routine (optional). | <ai> is the actor's initial [[ai]] routine (optional). | ||
{ actor code } is obviously the code for the actor. | { actor code } is obviously the code for the [[actor]]. | ||
[[enda]] ends an actor. | [[enda]] ends an [[actor]]. |
Revision as of 09:13, 25 December 2004
Similar to actor. This defines a new actor in a slightly more specific manner, and it does so without restraining the amount of defined actors. Version 1.3D only allowed so many actors so to add a new one required replacing another. Version 1.5 remedied this with useractor.
useractor <actortype> <name> <strength> <action> <move> <ai> { actor code } enda
<actortype> can either be "enemy," "enemystayput," or "notenemy." These terms are defined in DEFS.CON as:
- The "enemy" type makes an actor that is intended to be used as a character who commences actions on player sight.
- The "enemystayput" works the same as "enemy," except that the actor will not leave the sector it is placed in.
- The "notenemy" type was primarily intended to make an actor that is a decoration or otherwise not a threat to the player. This type of actor will have no shadow by default, and it will not be targeted if autoaim is enabled. Actors using the "notenemy" flag have their code executed at startup. This is extremely useful for coding enemies, as this allows for extended function, and has less quirks than using "enemy" or "enemystayput". A shadow may be applied in Eduke32 using the spriteshadow command. This is typically used for all new actors you may code.
<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. Also see strength.
<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 obviously the code for the actor.