Release.loop

From AGI Wiki
Revision as of 15:05, 19 April 2019 by Andrew Korson (talk | contribs) (Created page with "The '''release.loop''' command re-enables the auto loop select feature for a screen object. == Syntax == release.loop(obj oA); == Remarks == AGI includes...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 a 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:

<syntaxhighlight lang="agi">

  1. 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: 46 (0x2E hex)

See Also

fix.loop
Auto Loop Feature