Move: Difference between revisions
Helixhorned (talk | contribs) same edits as AI |
Hendricks266 (talk | contribs) No edit summary |
||
Line 7: | Line 7: | ||
<name> is the name of the move command. | <name> is the name of the move command. | ||
Warning: You '''cannot''' use the same name from a [[define]], or the game will | Warning: You '''cannot''' use the same name from a [[define]], or the game will crash. | ||
<horizontal> is the horizontal velocity of the [[actor]]. Negative values reverse direction. | <horizontal> is the horizontal velocity of the [[actor]]. Negative values reverse direction. | ||
Line 21: | Line 21: | ||
You '''cannot''' substitute <name> for a number, define, or gamevar. It has to be predefined with the first definition of move. | You '''cannot''' substitute <name> for a number, define, or gamevar. It has to be predefined with the first definition of move. | ||
==moveflags== | |||
Values for each <moveflag> (defined in DEFS.CON) are: | Values for each <moveflag> (defined in DEFS.CON) are: | ||
faceplayer | {| {{prettytable}} | ||
!moveflag!!description!! | |||
geth | |- | ||
|faceplayer | |||
getv | |[[actor]] faces the player. | ||
|- | |||
randomangle | |geth | ||
|use horizontal velocity. | |||
faceplayerslow | |- | ||
|getv | |||
spin | |use vertical velocity. | ||
|- | |||
faceplayersmart | |randomangle | ||
|[[actor]] will face random direction. | |||
fleeenemy | |- | ||
|faceplayerslow | |||
jumptoplayer | |same as faceplayer, but done gradually. | ||
|- | |||
seekplayer | |spin | ||
|spin in a clockwise circle. | |||
furthestdir | |- | ||
|faceplayersmart | |||
dodgebullet | |same as faceplayer, but with a slight "lead" on position. | ||
|- | |||
|fleeenemy | |||
|[[actor]] faces away from the player. | |||
|- | |||
|jumptoplayer | |||
|[[actor]] will move vertically and then fall as if jumping. | |||
|- | |||
|seekplayer | |||
|[[actor]] will try to find the best path to the nearest player. | |||
|- | |||
|furthestdir | |||
|[[actor]] faces the furthest distance from the closest player. | |||
|- | |||
|dodgebullet | |||
|[[actor]] attempts to avoid all shots directed at him. The [[actor]] will not avoid GROWSPARK. | |||
|} | |||
[[Category:Duke3D 1.3/1.5 commands]] | [[Category:Duke3D 1.3/1.5 commands]] | ||
[[Category:Sprite manipulation]] | [[Category:Sprite manipulation]] |
Revision as of 11:41, 1 December 2012
A move command is used to give velocity to an actor.
Define outside an actor as so:
move <name> <horizontal> <vertical>
<name> is the name of the move command.
Warning: You cannot use the same name from a define, or the game will crash.
<horizontal> is the horizontal velocity of the actor. Negative values reverse direction.
<vertical> is the vertical veloctity of the actor. Negative values cause upward motion.
Used inside an actor, a move command is written as:
move <name> <moveflags...>
<moveflags...> is a (possibly empty) sequence of parameters that specify certain hardcoded movement behavior.
You cannot substitute <name> for a number, define, or gamevar. It has to be predefined with the first definition of move.
moveflags
Values for each <moveflag> (defined in DEFS.CON) are:
moveflag | description | |
---|---|---|
faceplayer | actor faces the player. | |
geth | use horizontal velocity. | |
getv | use vertical velocity. | |
randomangle | actor will face random direction. | |
faceplayerslow | same as faceplayer, but done gradually. | |
spin | spin in a clockwise circle. | |
faceplayersmart | same as faceplayer, but with a slight "lead" on position. | |
fleeenemy | actor faces away from the player. | |
jumptoplayer | actor will move vertically and then fall as if jumping. | |
seekplayer | actor will try to find the best path to the nearest player. | |
furthestdir | actor faces the furthest distance from the closest player. | |
dodgebullet | actor attempts to avoid all shots directed at him. The actor will not avoid GROWSPARK. |