Next Previous Contents

6. Script actions

The Quake III: Team Arena menu language has a very basic scripting language to effect changes in other menus or items. Multiple statements are separated by semicolon (;).

6.1 fadein [string]

Causes a fade-in effect for items/menus with names or groups matching the given string.

See also: `script::fadeout', `menuDef::fadeClamp', `menuDef::fadeAmount', `menuDef::fadeCycle', `script::transition'.

6.2 fadeout [string]

Causes a fade-out effect for items/menus with names or groups matching the given string. `script::fadein', `menuDef::fadeClamp', `menuDef::fadeAmount', `menuDef::fadeCycle', `script::transition'.

6.3 show [string]

Turns on visibility for items/menus with names or groups matching the given string.

See also: `script::hide', `itemDef::cvartest', `itemDef::showcvar', `itemDef::hidecvar'.

6.4 hide [string]

Turns off visibility for items/menus with names or groups matching the given string.

See also: `script::show', `itemDef::cvartest', `itemDef::showcvar', `itemDef::hidecvar'.

6.5 open [string]

Opens a menu with name matching the given string.

See also: `script::close', `menuDef::onOpen'.

6.6 close [string]

Closes a menu with name matching the given string.

See also: `script::open', `menuDef::onClose', `menuDef::onEsc'.

6.7 setasset [string]

Not used (ineffectual).

Programmer's (mod) note: Supposedly use asset with the given name, but the source code has as a no-op (empty function).

See also: `itemDef::asset_model', `itemDef::asset_shader'.

6.8 setbackground [string]

Set/change background to the given shader name or filename.

See also: `menuDef::style', `itemDef::style', WINDOW_STYLE_FILLED, `menuDef::background', `itemDef::background'.

6.9 setteamcolor [color]

Changes the teamcolor used by "style WINDOW_STYLE_TEAMCOLOR".

See also: `menuDef::style', `itemDef::style', WINDOW_STYLE_TEAMCOLOR.

6.10 setitemcolor [string] [string] [color]

  1. Item name to affect.
  2. The string "backcolor"

See also: `itemDef::backcolor', `itemDef::forecolor', `itemDef::borderColor'.

6.11 setfocus [string]

Change focus to item/group with name matching the given string.

See also: `itemDef::onFocus',

6.12 setplayermodel [string]

The cvar "team_model" is set to the given string.

6.13 setplayerhead [string]

The cvar "team_headmodel" is set to the given string.

6.14 transition [string] [rect] [rect] [int] [float]

Simple animation effect by altering the rect dimensions.

  1. item/group name to affect.
  2. starting dimensions.
  3. ending dimensions.
  4. lifetime of animation

See also: menuDef::fadeClamp, menuDef::fadeAmount, menuDef::fadeCycle.

6.15 setcvar [string] [string]

First string is the name of the cvar to alter. Second string is the value to assign to the cvar.

See also: `itemDef::cvartest'.

6.16 exec [string]

Execute a string as a console command. Note this is NOT the same "exec" to load a .cfg file. To load a .cfg file in a menu script action, you can use:

exec "exec foo.cfg"

6.17 play [string]

Play the sound file or sound name indicated by the string.

See also: `script::playlooped', `menuDef::soundLoop'.

6.18 playlooped [string]

Starts playing the sound in an infinite loop. Use empty string ("") to stop loop.

See also: `script::play', `menuDef::soundLoop'.

6.19 orbit [string] [float] [float] [float] [int]

Start an orbiting camera.

  1. item to orbit (around(?))?
  2. Start angle?
  3. Delta (amount to change per step) angle?
  4. Number of seconds to spend orbiting?
The angle values are assumed to be radian polar coordinates (distance, angle), as this makes the most sense in a rotation context that uses radian trigonometric functions. For quick reference, 0 rad is 0 degress, 1.5707963267 is 90 degress, 3.1415926535 is 180 degress, 6.2431853070 is 360 degress.

6.20 uiScript [string]

Activates mod-specific actions based on string. This action is a means to trigger activity coded in the C portion of the mod. Valid parameters are mod-dependent, but those in the baseq3/q3ta source tree is provided.

See also: `Values for uiScript'


Next Previous Contents