Difference between revisions of "Fix.loop"
(Created page with "The '''fix.loop''' command disables the auto loop select feature for a screen object. == Syntax == fix.loop(obj oA); == Remarks...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 7: | Line 7: | ||
== Remarks == | == Remarks == | ||
− | AGI includes a [[Auto Loop Feature| | + | AGI includes a [[Screen object#Auto Loop Feature|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|screen object's]] current [[loop]] will stay the same regardless of the object's direction of motion. | The '''fix.loop''' command disables this feature. The [[screen object|screen object's]] current [[loop]] will stay the same regardless of the object's direction of motion. | ||
Line 15: | Line 15: | ||
== Possible Errors == | == 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 [[heap]], which may cause unexpected results, including possibly [[crashing AGI]]. | + | 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 == | == Example == |
Latest revision as of 00:38, 21 April 2019
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) |