From AGI Wiki
Revision as of 17:24, 23 April 2019 by Andrew Korson (Talk | contribs) (Remarks)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.


start.motion(obj oA);


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.

While in normal motion mode, an object will not move until it is given a direction via the set.dir command. It will continue moving until it reaches an obstacle, the edge of the screen, a new direction via command, or is stopped using the stop.motion command.

Unlike the other movement modes, changing to 'normal' does not modify the updating property. The cycling property is also not modified by the normal.motion command.

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.


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

Technical Information

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

See Also