Set (GUI command)

To change the GUI state (properties and values) or execute a GUI client command.

State change

Set a property or a variable to a given value. This is used to change the appearance or behavior of items during runtime. It doesn’t work on all kinds of properties, though, as some of them can’t be changed and are marked as so on the property reference.

Syntax

set "property" "value";

property is the name of a property in the current item, or a reference to a property on another item (through the “itemName::propertyName” syntax) or a reference to a key in the GUI state dictionary ( through the “gui::keyName” syntax).

value the new value that the property will carry.

Example(s)

set "buttonTwo::visible" "0";
set "livePan::rect" "0 0 640 200";
set "text" "You have clicked me";
set "gui::somestring" "How long";

Additional Note

If you are trying to set one property (property2 - the target property) equal to another property (property1 - the origional property you want to copy) you must reference the first property (property1) using the ‘$’ marker. Using the $ marker lets the parser know that you are referencing another property, not just a string.

set "property2" "$property1";

Command

Execute a gui command on the client. By using “cmd” as the first property, you tell the game to execute some action on the player’s own game. Commands are case insensitive. Commands are either handled by the engine or passed on to the game code , where there is further differentiation between menus and entities.

Engine GUI Commands

  • abort
  • checkKeys
  • CheckUpdate
  • exec
  • startgame
  • FilterServers
  • LANConnect
  • loadBinds
  • loadGame
  • loadMod
  • MAPScan
  • music
  • note
  • punkbuster
  • RefreshServers
  • resetCvars
  • startMultiplayer
  • updateSaveGameInfo
  • UpdateServers

Game GUI Commands

  • admin
  • bind
  • callVote
  • chatmessage
  • clearbind
  • click_maplist
  • close
  • disconnect
  • MAPScan
  • mpSkin
  • play
  • quit
  • readytoggle
  • sound
  • spectate
  • teamtoggle
  • video
  • voteno
  • voteyes

Entity

Player

  • addhealth
  • close
  • playpdaaudio
  • playpdavideo
  • ready
  • stoppdaaudio
  • stoppdavideo
  • updatepda
  • updatepda2

Elevator

changefloor

Syntax

set "cmd" value

value is a gui command you want the game client to execute, with all parameters you may want to add to it.

Example(s)

set "cmd" "resetCvars";
set "cmd" "play guisounds_menuclickup";
set "cmd" "runScript map_cpuboss::bridge_rotate_east ; play guisounds_action";