Object.on.anything

From AGI Wiki
Revision as of 22:39, 13 April 2019 by Andrew Korson (talk | contribs) (Created page with "The '''object.on.anything''' command removes area restrictions from a screen object. == Syntax == object.on.anything(obj oA); == Remarks == This comm...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The object.on.anything command removes area restrictions from a screen object.

Syntax

object.on.anything(obj oA);

Remarks

This command removes any area restrictions assigned to a screen object by an object.on.water or object.on.land command.

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 cat o1

... [ initialize object object.on.land(cat); [ cats hate water ... object.on.anything(cat); [ teach cat to swim ... object.on.water(cat); [ now cat loves the water; won't come out! </syntaxhighlight>

Technical Information

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

See Also

object.on.land
object.on.water