Fix.loop
The fix.loop command disables the auto loop select feature for a screen object.
Syntax
fix.loop(obj oA);
Remarks
AGI includes a auto-loop feature that automatically changes an object's loop based in its direction of motion. This made it much simpler for dealing with characters that need to change profiles as they move about the screen. (For example, when walking to the right, show a right facing loop, when walking toward the horizon, show a rear view loop, etc.)
The fix.loop command disables this feature. The screen object's current loop will stay the same regardless of the object's direction of motion.
Use the release.loop command to re-enable the auto loop select feature.
Possible Errors
AGI does not check that object number oA is a valid 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
<syntaxhighlight lang="agi">
- define dancer o4
... [ initialize and draw object set.loop(dancer, 2); [ face forward fix.loop(dancer); [ begin dancing, always face forward ... release.loop(dancer); [ done dancing </syntaxhighlight>
Technical Information
Required Interpreter Version: | Available in all AGI versions. |
Byte-Code Value: | 45 (0x2D hex) |