Release.loop

From AGI Wiki
Jump to navigationJump to search

The release.loop command re-enables the auto loop select feature for a screen object.

Syntax

release.loop(obj oA);

Remarks

AGI includes an auto-loop feature that automatically changes a screen 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.

The release.loop command re-enables the auto loop select feature for screen object oA, if it has been disabled by the fix.loop command.

If the screen object is already using the auto loop select feature, release.loop has no effect.

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:
#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

Technical Information

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

See Also

fix.loop
Auto Loop Feature