Ai: Difference between revisions
Jump to navigation
Jump to search
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 |
Doom64hunter (talk | contribs) mNo edit summary |
||
Line 1: | Line 1: | ||
The ai | The command '''ai''' refers to both the declaration, which defines a combination of [[action]]s and [[move]]ments for an [[actor]] to execute, and to the statement that executes a predefined ai within the [[actor]]'s code. | ||
== Declaration == | |||
'' | <span {{code}}>'''ai''' <name> <action> <move> <moveflags>... </span> | ||
Defines action and movement for the actor to use. This statement must be placed outside of any actor or event code. | |||
==== Arguments ==== | |||
* <span {{code}}><name></span> is the name of the ai routine. | |||
* <span {{code}}><action></span> is the [[action]] the [[actor]] will display when the ai routine is called. | |||
:'''ai''' <ainame> | * <span {{code}}><move></span> is the [[move]] used during the ai routine. | ||
* <span {{code}}><moveflags...></span> is a (possibly empty) sequence of parameters that specify certain hardcoded movement behavior. | |||
:See [[move#moveflags|moveflags]] for more information. | |||
== Runtime Command == | |||
<span {{code}}>'''ai''' <ainame></span> | |||
Executes a predefined '''ai''' inside the actor code, identified by its ''<ainame>''. | |||
[[Category:Duke3D 1.3/1.5 commands]] | [[Category:Duke3D 1.3/1.5 commands]] | ||
[[Category:Sprite manipulation]] | [[Category:Sprite manipulation]] |
Latest revision as of 06:22, 10 January 2021
The command ai refers to both the declaration, which defines a combination of actions and movements for an actor to execute, and to the statement that executes a predefined ai within the actor's code.
Declaration
ai <name> <action> <move> <moveflags>...
Defines action and movement for the actor to use. This statement must be placed outside of any actor or event code.
Arguments
- <name> is the name of 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.
- See moveflags for more information.
Runtime Command
ai <ainame>
Executes a predefined ai inside the actor code, identified by its <ainame>.