Difference between revisions of "Current.loop"
From AGI Wiki
Jump to navigationJump to search (Created page with "current.loop == <br />Syntax == <blockquote><code>current.loop(oA,vB);</code></blockquote> == Description == vB is set to the number of the current loop of ...") |
|||
Line 1: | Line 1: | ||
− | current.loop | + | The '''current.loop''' command stores the number of the current loop of an object in a variable. |
− | + | == Syntax == | |
− | + | current.loop([[screen object|obj]] oA, [[variable|var]] vB); | |
− | + | == Remarks == | |
− | + | Variable '''vB''' is set to the current [[loop]] number for [[screen object|object]] '''oA'''. | |
− | |||
− | + | == Possible Errors == | |
− | + | AGI does not check that object number oA is a valid object. If it is not, the returned value is meaningless. | |
− | |||
− | + | == Example == | |
− | + | <div class="CodeBlockHeader">Code:</div> | |
+ | <syntaxhighlight lang="agi"> | ||
+ | current.loop(o0, v51); [ v51 now holds ego's current loop | ||
+ | </syntaxhighlight> | ||
− | == | + | == Technical Information == |
− | + | {| border="1" cellpadding="2" | |
− | + | | style="background-color: #efefef" width="200" | '''Required Interpreter Version:''' | |
− | + | | width="175" | Available in all AGI versions. | |
− | + | |- | |
+ | | style="background-color: #efefef" | '''Byte-Code Value:''' | ||
+ | | 51 (0x33 hex) | ||
+ | |} | ||
− | + | == See Also == | |
− | [[ | + | '''[[current.cel]]'''<br /> |
− | [[Category: | + | '''[[current.view]]'''<br /> |
+ | '''[[last.cel]]'''<br /> | ||
+ | '''[[number.of.loops]]'''<br /> | ||
+ | '''[[set.loop]]'''<br /> | ||
+ | '''[[set.loop.v]]'''<br /> | ||
+ | [[Category:Commands]]<br /> |
Latest revision as of 17:18, 29 March 2019
The current.loop command stores the number of the current loop of an object in a variable.
Syntax
Remarks
Variable vB is set to the current loop number for object oA.
Possible Errors
AGI does not check that object number oA is a valid object. If it is not, the returned value is meaningless.
Example
Code:
<syntaxhighlight lang="agi"> current.loop(o0, v51); [ v51 now holds ego's current loop </syntaxhighlight>
Technical Information
Required Interpreter Version: | Available in all AGI versions. |
Byte-Code Value: | 51 (0x33 hex) |
See Also
current.cel
current.view
last.cel
number.of.loops
set.loop
set.loop.v