Reverse.cycle
The reverse.cycle command switches an object's cycle mode to 'reverse cycle'.
Syntax
reverse.cycle(obj oA);
Remarks
In 'reverse cycle' cycle mode, screen object oA will cycle through the cels in the current loop in reverse order, from last to first. The cycle repeats indefinitely.
Setting the cycle mode to 'reverse cycle' will NOT automatically enable the object for updating if it is not currently enabled; you must use the start.update command to enable updating. Only the cycling property is enabled.
Changing cycle mode does not change the current cel. The new cycle mode begins with whatever cel is currently assigned to the object.
Use the stop.cycling command to turn cycling off. The normal.cycle, end.of.loop and reverse.loop commands can be used to switch to other cycle modes.
Possible Errors
AGI does not check that object number oA is valid screen object. If the object has not been initialized, the reverse.cycle command still sets the cycle mode to 'reverse cycle' but nothing else will happen. If the object number exceeds the max screen object number, data used for other purposes will be overwritten, which may cause unexpected results, including possibly crashing AGI.
Example
<syntaxhighlight lang="agi">
- define elevator o5
[ initialize the object ... reverse.cycle(elevator); [ going down... ... normal.cycle(elevator); [ going up... </syntaxhighlight>
Technical Information
Required Interpreter Version: | Available in all AGI versions. |
Byte-Code Value: | 74 (0x4A hex) |