Number.of.loops

From AGI Wiki
Revision as of 18:29, 12 April 2019 by Andrew Korson (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The number.of.loops command stores the number of loops in an object's assigned view in a variable.

Syntax

number.of.loops(obj oA, var vB);

Remarks

Variable vB is set to the number of loops in the view assigned to screen object oA.

Possible Errors

AGI does not check that object number oA is a valid screen object. If it is not, the returned value will be meaningless.

Example

Code:

<syntaxhighlight lang="agi"> animate.obj(o1); load.view(2); [ load and set.view(o1, 2); [ assign a view number.of.loops(o1, v51); [ v51 now equals number of loops in view 2 </syntaxhighlight>

Technical Information

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

See Also

set.loop
set.loop.v
current.loop