Ai

From EDukeWiki
(Redirected from AI)
Jump to navigation Jump to search

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.
  • <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.
See moveflags for more information.

Runtime Command

ai <ainame>

Executes a predefined ai inside the actor code, identified by its <ainame>.