Animate.obj

From AGI Wiki
Revision as of 19:57, 21 March 2019 by Andrew Korson (talk | contribs)
Jump to navigationJump to search

The animate.obj command tells the interpreter to activate the specified object. An object must be activated in the current room before it can be used.

Syntax

animate.obj(obj oA);

Parameters

Remarks

Screen objects must be initialized with the animate.obj command before they can be used in any other commands. Most commands that are run on an uninitialized screen objects are just ignored by AGI, but some of them can result in interactions with invalid data. When a screen object is initialized it is enabled for updating and cycling by default. If you call the animate.obj command on an object that is already initialized, the command is ignored.

Possible errors

If the object number exceeds the max screen object value (specified in the OBJECT File), AGI will raise trappable error #13.

Example

Code:

<syntaxhighlight lang="agi"> // 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); </syntaxhighlight>

Technical Information

Required Interpreter Version: Available in all AGI versions
Byte-Code Value: 33 (0x21 hex)

See also

Sources

Some of the text in this article comes from the AGI Studio help file.