Difference between revisions of "Last.cel"
From AGI Wiki
Jump to navigationJump to searchLine 1: | Line 1: | ||
− | last.cel | + | The '''last.cel''' command stores the last cel number of a screen object's current loop in a [[variable]]. |
− | + | == Syntax == | |
− | + | last.cel([[screen object|obj]] oA, [[variable|var]] vB); | |
− | + | == Remarks == | |
− | + | Variable '''vB''' is set to the last [[cel]] number for a [[screen object|screen object's]] current [[loop]]. Because the first cel is numbered 0, the last cel will be the cel count - 1. | |
− | |||
− | + | == Possible Errors == | |
− | + | AGI does not check that screen object number oA is a valid object. If it is not, the returned value will be meaningless. | |
− | |||
− | + | == Example == | |
− | + | <div class="CodeBlockHeader">Code:</div> | |
+ | <syntaxhighlight lang="agi"> | ||
+ | last.cel(o0, v51); [ v51 is set to last cel of 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:''' | ||
+ | | 49 (0x31 hex) | ||
+ | |} | ||
− | + | == See Also == | |
− | [[ | + | '''[[current.cel]]'''<br /> |
− | [[Category: | + | '''[[current.loop]]'''<br /> |
+ | '''[[current.view]]'''<br /> | ||
+ | '''[[set.cel]]'''<br /> | ||
+ | '''[[set.cel.v]]'''<br /> | ||
+ | [[Category:Commands]]<br /> |
Latest revision as of 16:44, 9 April 2019
The last.cel command stores the last cel number of a screen object's current loop in a variable.
Syntax
Remarks
Variable vB is set to the last cel number for a screen object's current loop. Because the first cel is numbered 0, the last cel will be the cel count - 1.
Possible Errors
AGI does not check that screen object number oA is a valid object. If it is not, the returned value will be meaningless.
Example
Code:
<syntaxhighlight lang="agi"> last.cel(o0, v51); [ v51 is set to last cel of ego's current loop </syntaxhighlight>
Technical Information
Required Interpreter Version: | Available in all AGI versions. |
Byte-Code Value: | 49 (0x31 hex) |