HudExists

Family: Studio · One form

What it does

Tells whether the HUD has an element with this id or name.

Syntax

HudExists(element string) → integer

Parameters

NameTypeMeaning
elementstringThe HUD element's id or name. The name is matched exactly first, then ignoring case.

Every form returns

integer

1 if at least one element matches, 0 otherwise.

Example · generated

DO  Print(HudExists("value"))  Sync()LOOP

HudExists 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.

133 commands in Studio