From AGI Wiki
Jump to: navigation, search

The stop.update command disables the updating property of a screen object, which prevents it from moving or cycling.


stop.update(obj oA);


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.

The stop.update command disables updating for screen object oA.

When updating is disabled, the object remains on the visual screen as is, without moving or cycling. Changes to the object's loop and/or cel will not be reflected on screen until updating is re-enabled. If the object's movement or cycling mode is changed, updating may be re-enabled automatically; for details, see each movement mode or cycling mode's command individual topic.

The start.update command can be used to re-enable updating without making changes to the movement or cycling 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.


[ 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

Technical Information

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

See Also

Moving Objects
Cycling Objects