Difference between revisions of "AGIWiki/animate.obj"

From ScummVM :: Wiki
Jump to navigation Jump to search
m (Created page with "__NOTOC__ {{AGIWiki}} The '''animate.obj''' command activates a screen object. == Syntax == : animate.obj(obj oA); == Remarks == If the object nu...")
 
m (Text replacement - "<source lang=" to "<syntaxhighlight lang=")
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{AGIWiki}}
{{AGIWiki}}
 
{{AGIWiki/Object and View commands}}
The '''animate.obj''' command activates a screen object.
The '''animate.obj''' command activates a screen object.


Line 8: Line 7:


: animate.obj([[AGIWiki/Screen objects|obj]] oA);
: animate.obj([[AGIWiki/Screen objects|obj]] oA);
== Parameters ==
* <code>object</code>: an [[AGIWiki/Screen objects|object]], <code>o0 - o255</code>; this object will be activated for use


== Remarks ==
== Remarks ==


If the object number exceeds the [[AGIWiki/Screen objects#Maximu screen objects|max screen object]] count, AGI will generate an error.
If the object number exceeds the [[AGIWiki/Screen objects#Maximu screen objects|max screen object]] count, usually 16, AGI will crash with a [[AGIWiki/Bad object number error|bad object number error]]. ( e.g. <code>o17</code> )


Screen objects must be activated with the '''animate.obj''' command before it can be used in any other commands. Attempting to run commands on an unitialized screen object will generate a runtime error.
Screen objects must be activated with the '''animate.obj''' command before it can be used in any other commands. Attempting to run commands on an unitialized screen object will generate a runtime error.
Line 19: Line 22:
== Example ==
== Example ==


<syntax type = "C++">
<syntaxhighlight lang="cpp">
//basic steps needed to create
//basic steps needed to create
//and display a screen object
//and display a screen object
Line 27: Line 30:
position(o2,80,120);
position(o2,80,120);
draw(o2);
draw(o2);
</syntax>
</syntaxhighlight>


== Technical Information ==
== Technical Information ==


{| border="1" cellpadding="2"
{| border="1" cellpadding="5" cellspacing="5" style="border-collapse: collapse; border-style: hidden;"  
| style="background-color: #efefef" | '''Required interpreter version'''
| '''Required interpreter version'''
| Available in all AGI versions
| Available in all AGI versions
|-
|-
| style="background-color: #efefef" | '''Bytecode value'''
| '''Bytecode value'''
| 33 (0x21 hex)
| 33 (0x21 hex)
|}
|}
== Related ==
* [[AGIWiki/unanimate.all|unanimate.all]]
== Sources ==
Some of the content of this page was taken from the [[AGIWiki/AGI Studio|AGI Studio]] & [[AGIWiki/WinAGI|WinAGI]] help files.


[[Category:AGIWiki/Logic Commands]]
[[Category:AGIWiki/Logic Commands]]
[[Category:AGIWiki/Object and View Commands]]
[[Category:AGIWiki/Object and View Commands]]

Latest revision as of 15:14, 25 October 2018

AGIWiki


Object and View Commands

The animate.obj command activates a screen object.

Syntax

animate.obj(obj oA);

Parameters

  • object: an object, o0 - o255; this object will be activated for use

Remarks

If the object number exceeds the max screen object count, usually 16, AGI will crash with a bad object number error. ( e.g. o17 )

Screen objects must be activated with the animate.obj command before it can be used in any other commands. Attempting to run commands on an unitialized screen object will generate a runtime error.

If you call the animate.obj command on an objedct that is already activated, the command is ignored.

Example

//basic steps needed to create
//and display a screen object
animate.obj(o2);
load.view(4);
set.view(o2,4);
position(o2,80,120);
draw(o2);

Technical Information

Required interpreter version Available in all AGI versions
Bytecode value 33 (0x21 hex)

Related

Sources

Some of the content of this page was taken from the AGI Studio & WinAGI help files.