Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:3.4

Description

Description:Sets a statebox control to a specific index (displays the associated icon, defined in the stateIcons array parameter - for more information, see UI Control: Statebox in the VBS3 Developer Reference).

Syntax

Syntax:control sbSetCurrentState index
Parameters:
  • control: Control - Statebox control.
  • index: Number - Index of the state icon to show (0-based). If higher than the number of icons available, the command is ignored.
Return Value:Nothing

Examples

Examples:
_sb sbSetCurrentState 3

Additional Information

See also: sbGetCurrentState, sbGetStates
Multiplayer:
Problems:Before V3.6, no ctrlAddEventHandler fires, if the state changes using this command.

Notes