What it does
Tells whether at least one entity of the scene matches an id, a name or a tag.
Syntax
EntityExists(entity string) → integerParameters
| Name | Type | Meaning |
|---|---|---|
| entity | string | The entity's id, name or tag, as the editor shows it. The match is exact. |
Every form returns
integer
1 if at least one entity matches, 0 otherwise.
Good to know
- The lookup tries the id first, then the name, then the tag. A match at one level hides the levels below it.
Example · generated
DO Print(EntityExists("value")) Sync()LOOPEntityExists is called and its answer is printed every frame. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.