Difference between revisions of "Start.motion"

From AGI Wiki
Jump to: navigation, search
m (Remarks)
Line 7: Line 7:
 
== Remarks ==
 
== Remarks ==
  
This command sets [[screen object]] '''oA''''s [[movement mode]] to 'normal'. If the screen object is the [[ego]] object (o0) it also switches to [[player.control|player control]] mode.
+
This command sets [[screen object]] '''oA''' to 'normal' [[movement mode]]. If the screen object is the [[ego]] object (o0) it also switches to [[player.control|player control]] mode.
  
 
This command is identical to the '''[[normal.motion]]''' command, except that it also switches [[ego]] to [[player.control|player control]] mode. The '''[[normal.motion]]''' does not automatically switch ego control mode.
 
This command is identical to the '''[[normal.motion]]''' command, except that it also switches [[ego]] to [[player.control|player control]] mode. The '''[[normal.motion]]''' does not automatically switch ego control mode.

Revision as of 17:18, 23 April 2019

The start.motion command sets a screen object's movement mode to 'normal', and if the object is ego, also sets the ego to player control mode.

Syntax

start.motion(obj oA);

Remarks

This command sets screen object oA to 'normal' movement mode. If the screen object is the ego object (o0) it also switches to player control mode.

This command is identical to the normal.motion command, except that it also switches ego to player control mode. The normal.motion does not automatically switch ego control mode.

Possible Errors

AGI does not check that object number oA is a valid screen object. If it is not, this command will overwrite other data on the memory heap, which may cause unexpected results, including possibly crashing AGI.

Example

Code:
stop.motion(ego); [ ego stops moving, and switches to program control
start.motion(ego);
[ equivalent code
normal.motion(ego);
player.control();
...
[ for non-ego objects these two lines do EXACTLY the same thing
start.motion(o1);
normal.motion(o1);

Technical Information

Required Interpreter Version: Available in all AGI versions.
Byte-Code Value: 78 (0x4E hex)

See Also

normal.motion
player.control
stop.motion