any

From Wiki of ZZT
Revision as of 03:17, 8 February 2021 by Rbts (talk | contribs) (Created page with "{{DISPLAYTITLE:any}} '''any''' is an internal flag in ZZT-OOP. When called, it scans the entire board for matching entities, and evaluates to true if at least one instance...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

any is an internal flag in ZZT-OOP. When called, it scans the entire board for matching entities, and evaluates to true if at least one instance is found. any can detect anything with a ZZT-OOP name, and a color argument can be specified as well.

any does not look beneath statted entities, so it's possible for it to miss things that are under objects, such as fake walls.


Usage Example

This object changes its char graphic whenever there is at least one (bright) red gem on-screen.

@object
#cycle 1

:loop
#if any red gem char 2
#if not any red gem char 1
/i#loop