Start.update

From AGI Wiki
Revision as of 18:26, 23 April 2019 by Andrew Korson (talk | contribs) (Created page with "The '''start.update''' command re-enables the updating property of a screen object, allowing it to move and cycle. == Syntax == start.update(obj oA);...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The start.update command re-enables the updating property of a screen object, allowing it to move and cycle.

Syntax

start.update(obj oA);

Remarks

By default, screen objects are enabled for updating which means they will move according to their set movement mode and cycle according to their cycle mode. If the object's updating property is disabled with the stop.update command, the object will not move, and it will not cycle. It will also not show changes in loop and cel made by set.loop and set.cel commands.

The start.update command will re-enable updating for screen object oA. Once re-enabled, the screen object will begin moving and cycling again according to it's movement mode and cycle mode.

Possible Errors

AGI does not check that object number oA is a valid screen object. If it is not, this command will overwrite other data on the memory heap, which may cause unexpected results, including possibly crashing AGI.

Example

Code:

<syntaxhighlight lang="agi"> [ assume object o3 is initialized, has a valid view assigned, [ and is currently drawn on the screen set.loop(o3, 1); [ object will cycle normally through loop 1 move.obj(o3, 120, 100); [ and object will move to target location stop.update(o3); [ object is frozen (disabled); it won't move or cycle set.loop(o3, 0); [ the loop changes, but it won't show on the screen yet set.cel(o3, 1); [ the cel changes, but it won't show on the screen yet start.update(o3); [ object is re-enabled, and will now show loop 0 cel 1

                       [ and it will begin cycling and moving again

</syntaxhighlight>

Technical Information

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

See Also

force.update start.cycling
start.motion
stop.cycling
stop.motion
stop.update