Useractor: Difference between revisions
Helixhorned (talk | contribs) ai -> moveflags |
Hendricks266 (talk | contribs) No edit summary |
||
Line 5: | Line 5: | ||
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. | ||
<actortype> | <actortype> is technically a [[bitfield]]. It is generally either "enemy", "enemystayput", or "notenemy". | ||
{| {{prettytable}} | |||
!DEFS.CON Label!!Value!![[htflags]] implied!!Description | |||
|- | |||
|notenemy||0||<font color="gray">(none)</font>||The catch-all default category for generic objects such as decorations. No shadow by default. Will not be targeted if autoaim is enabled. Code begins executing at the start of a level. | |||
|- | |||
|enemy||1||SFLAG_BADGUY||Enables hardcoded behavior for enemies/monsters such as shadows and autoaim. Code only begins executing upon player sight. | |||
|- | |||
|enemystayput||2||SFLAG_BADGUY<br>SFLAG_BADGUYSTAYPUT||Same as "enemy" plus the [[actor]] will not leave the [[sector]] it is placed in. | |||
|- | |||
|<font color="gray">(none)</font>||4||SFLAG_ROTFIXED|| | |||
|} | |||
<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. | ||
Line 28: | Line 32: | ||
[[enda]] ends an [[actor]]. | [[enda]] ends an [[actor]]. | ||
'''useractor''' is typically used for all new [[actor]]s you may code. | '''useractor''' is typically used for all new [[actor]]s you may code. | ||
Line 34: | Line 40: | ||
When the notenemy option is chosen, the blocking feature will work differently. For some reason, you can walk through moving actors, but when they stand still, you can't? | When the notenemy option is chosen, the blocking feature will work differently. For some reason, you can walk through moving actors, but when they stand still, you can't? | ||
[[Category:Duke3D 1.3/1.5 commands]] | [[Category:Duke3D 1.3/1.5 commands]] | ||
[[Category:Sprite manipulation]] | [[Category:Sprite manipulation]] |
Revision as of 23:18, 27 February 2014
useractor <actortype> <name> [strength] [action] [move] [moveflags...]
- (actor code...)
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.
<actortype> is technically a bitfield. It is generally either "enemy", "enemystayput", or "notenemy".
DEFS.CON Label | Value | htflags implied | Description |
---|---|---|---|
notenemy | 0 | (none) | The catch-all default category for generic objects such as decorations. No shadow by default. Will not be targeted if autoaim is enabled. Code begins executing at the start of a level. |
enemy | 1 | SFLAG_BADGUY | Enables hardcoded behavior for enemies/monsters such as shadows and autoaim. Code only begins executing upon player sight. |
enemystayput | 2 | SFLAG_BADGUY SFLAG_BADGUYSTAYPUT |
Same as "enemy" plus the actor will not leave the sector it is placed in. |
(none) | 4 | SFLAG_ROTFIXED |
<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).
<moveflags...> is is a (possibly empty) sequence of parameters that specify certain hardcoded movement behavior (optional, see move).
(actor code...) is obviously the code for the actor.
useractor is typically used for all new actors you may code.
A shadow may be applied in EDuke32 using the spriteshadow command.
When the notenemy option is chosen, the blocking feature will work differently. For some reason, you can walk through moving actors, but when they stand still, you can't?