HudValue

Family: Studio · One form

What it does

Sets the value of a HUD element, such as a bar or a gauge, found by the name it has in the editor.

Syntax

HudValue(element string, value float)

Parameters

NameTypeMeaning
elementstringThe HUD element's id or name. The name is matched exactly first, then ignoring case.
valuefloatThe new value. Its meaning depends on the element.

Every form returns

nothing

Good to know

  • Every element with that name is changed. An unknown name changes nothing and writes one warning to the console, once per name.

Example · generated

HudValue("value", 1.0)DO  Sync()LOOP

HudValue is called with values of the types its signature asks for. 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.

Related commands

133 commands in Studio