Ai: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Helixhorned (talk | contribs) rename 'type' to 'moveflags', add ellipsis so that it's clear there can be 0+ of them, reword slightly, tell where the moveflag defs come from |
||
Line 6: | Line 6: | ||
''Define'' an ai outside of the actor code using the following syntax: | ''Define'' an ai outside of the actor code using the following syntax: | ||
:'''ai''' <name> <action> <move> < | :'''ai''' <name> <action> <move> <moveflags...> | ||
:<name> is the name of the ai routine. | :<name> is the name of the ai routine. | ||
:<action> is the [[action]] the [[actor]] will display when the ai routine is called. | :<action> is the [[action]] the [[actor]] will display when the ai routine is called. | ||
:<move> is the [[move]] used during the ai routine. | :<move> is the [[move]] used during the ai routine. | ||
:< | :<moveflags...> is a (possibly empty) sequence of parameters that specify certain hardcoded movement behavior. | ||
:Values for < | :Values for each <moveflag> (defined in DEFS.CON) are: | ||
:faceplayer, geth, getv, randomangle, faceplayerslow, spin, faceplayersmart, fleeenemy, jumptoplayer, seekplayer, furthestdir, and dodgebullet. See [[move]] for more information. | :faceplayer, geth, getv, randomangle, faceplayerslow, spin, faceplayersmart, fleeenemy, jumptoplayer, seekplayer, furthestdir, and dodgebullet. See [[move]] for more information. | ||
Revision as of 09:48, 17 June 2012
The ai command is used in two different ways:
- To define a combination of actions and movements for an actor to execute.
- To execute a predefined ai within the actor's code.
Define an ai outside of the actor code using the following syntax:
- ai <name> <action> <move> <moveflags...>
- <name> is the name of the ai routine.
- <action> is the action the actor will display when the ai routine is called.
- <move> is the move used during the ai routine.
- <moveflags...> is a (possibly empty) sequence of parameters that specify certain hardcoded movement behavior.
- Values for each <moveflag> (defined in DEFS.CON) are:
- faceplayer, geth, getv, randomangle, faceplayerslow, spin, faceplayersmart, fleeenemy, jumptoplayer, seekplayer, furthestdir, and dodgebullet. See move for more information.
Execute a predefined ai inside the actor code using the following syntax:
- ai <ainame>