Object.on.anything

From AGI Wiki
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:
#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!

Technical Information

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

See Also

object.on.land
object.on.water