Ai: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Mblackwell (talk | contribs)
No edit summary
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
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
A set of code used in a routine to operate an [[actor]]. Not usually needed.
The ai command is used in two different ways:


ai <name> <action> <move> <type>
#To define a combination of [[action]]s and [[move]]ments for an [[actor]] to execute.
#To execute a predefined ai within the actor's code.


<name> is the name of the ai routine.
''Define'' an ai outside of the actor code using the following syntax:


<action> is the [[action]] the [[actor]] will display when the ai routine is called.
:'''ai''' <name> <action> <move> <moveflags...>


<move> is the [[move]] used during 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.
:<move> is the [[move]] used during the ai routine.
:<moveflags...> is a (possibly empty) sequence of parameters that specify certain hardcoded movement behavior.


<type> is a parameter set used for directional functions on the [[move]] command.
: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.


Values for <type> are:
''Execute'' a predefined ai inside the actor code using the following syntax:


faceplayer, geth, getv, randomangle, faceplayerslow, spin, faceplayersmart, fleeenemy, jumptoplayer, seekplayer, furthestdir, and dodgebullet. See [[move]] for more information.
:'''ai''' <ainame>
 
[[Category:Duke3D 1.3/1.5 commands]]
[[Category:Sprite manipulation]]

Revision as of 10:48, 17 June 2012

The ai command is used in two different ways:

  1. To define a combination of actions and movements for an actor to execute.
  2. 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>