Difference between revisions of "Current.cel"

From AGI Wiki
Jump to navigationJump to search
(Created page with "current.cel   == <br />Syntax == <blockquote><code>current.cel(oA,vB);</code></blockquote> == <br />Description == vB is set to the number of the current cel of obje...")
 
 
Line 1: Line 1:
current.cel
+
The '''current.cel''' command stores the number of the current cel of a [[screen object]] in a [[variable]].
  
&nbsp;
+
== Syntax ==
  
== <br />Syntax ==
+
current.cel([[screen object|obj]] oA, [[variable|var]] vB);
  
<blockquote><code>current.cel(oA,vB);</code></blockquote>
+
== Remarks ==
  
== <br />Description ==
+
Variable '''vB''' is set to the current [[cel]] number for [[screen object]] '''oA'''.
  
vB is set to the number of the current cel of object oA.
+
== Possible Errors ==
  
== <br />Sources ==
+
AGI does not check that object number '''oA''' is a valid object. If it is not, the returned value is meaningless.
  
[[AGI Studio Help File]]
+
== Example ==
  
== <br />See also ==
+
<div class="CodeBlockHeader">Code:</div>
 +
<syntaxhighlight lang="agi">
 +
current.cel(o0, v50);  [ v50 now holds ego's current cel number
 +
</syntaxhighlight>
  
* <code>[[set.cel]]</code>
+
== Technical Information ==
* <code>[[set.cel.v]]</code>
 
* <code>[[last.cel.v]]</code>
 
* <code>[[current.loop]]</code>
 
  
&nbsp;
+
{| 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:'''
 +
| 50 (0x32 hex)
 +
|}
  
[[Category:Object Commands]]
+
== See Also ==
[[Category:View Commands]]
+
 
 +
'''[[current.loop]]'''<br />
 +
'''[[current.view]]'''<br />
 +
'''[[last.cel]]'''<br />
 +
'''[[set.cel]]'''<br />
 +
'''[[set.cel.v]]'''<br />
 +
[[Category:Commands]]<br />

Latest revision as of 21:26, 28 March 2019

The current.cel command stores the number of the current cel of a screen object in a variable.

Syntax

current.cel(obj oA, var vB);

Remarks

Variable vB is set to the current cel number for screen 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:
current.cel(o0, v50);  [ v50 now holds ego's current cel number

Technical Information

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

See Also

current.loop
current.view
last.cel
set.cel
set.cel.v