Ignore.blocks

From AGI Wiki
Revision as of 20:07, 8 April 2019 by Andrew Korson (talk | contribs) (Created page with "The '''ignore.blocks''' command allows an object to ignore blocks and conditional control lines. == Syntax == ignore.blocks(obj oA); == Remarks == The de...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The ignore.blocks command allows an object to ignore blocks and conditional control lines.

Syntax

ignore.blocks(obj oA);

Remarks

The default behavior for screen objects is to observe blocks. Use the ignore.blocks command to allow screen object oA to ignore blocks.

In addition to ignoring blocks, this command will also cause objects to ignore conditional control lines (pixels with priority of 1 on the priority screen).

Possible Errors

AGI does not check that screen object number oA is a valid 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"> block(25, 25, 100, 100); [ create a block ignore.blocks(o1); [ object 1 will ignore the block ... observe.blocks(o1); [ now object 1 will observe the block ... unblock(); [ remove the block </syntaxhighlight>

Technical Information

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

See Also

Screen Object/View Commands
block
unblock
observe.blocks
Managing Obstacles
Control Lines