Observe.objs

From AGI Wiki
Revision as of 17:32, 14 April 2019 by Andrew Korson (talk | contribs) (Created page with "The '''observe.objs''' command prevents a screen object from moving through other objects. == Syntax == observe.objs(obj oA); == Remarks == If screen o...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The observe.objs command prevents a screen object from moving through other objects.

Syntax

observe.objs(obj oA);

Remarks

If screen object oA was previously set to ignore other objects (using the ignore.obj command), the observe.objs command restores normal behavior.

Use the ignore.objs command to allow an object to pass through other screen objects.

Possible Errors

AGI does not check that screen 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">

  1. define o3 ghost

ignore.objs(ghost); [ this ghost can move through other objects ... observe.objs(ghost); [ now this ghost cannot move through other objects </syntaxhighlight>

Technical Information

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

See Also

ignore.objs
observe.blocks
observe.horizon