Urban Terror Wiki
Urban Terror Wiki
Game variables

A few game variables and their results in chat.

For more information, see Scripting Basics

Variables for ut_radio / say_team commands. These do not work with ut_echo commands. They also will not work elsewhere in scripts. You can prefix variables with $ or #.


Variable Description Output type
$bullets Number of bullets in your current clip.

So $bullets bullets remaining might output "30 bullets remaining"

<number>
$clips Number of clips remaining.

So $clips clips remaining might output "2 clips remaining"

<number>
$crosshair Current map location under crosshair. Outputs "unknown" if map does not specify location name.

So Enemy spotted at $crosshair might output "Enemy spotted at Camel Corner"

<text>
$gameitem "flag" in CTF, "bomb" in Bomb Mode, and "cat-bird" or randomly "coinbird" in other game modes.

So I've got the $gameitem! might output "I've got the flag!" or "I've got the bomb!"

<"flag" | "bomb" | "cat-bird" | "coinbird">
$gametime Remaining time in this game. Very inaccurate though! For example, with 47 seconds left, it might report 8 seconds, or with 2:55 left, it will report 2 minutes.

So Hurry! Only $gametime left! might output "Hurry! Only 2 minutes left!"

<number> <"minutes" | "seconds">
$health Current health status. 0-10% = near death, 10-50% = badly wounded, 50-90% = wounded, 90%-100% = healthy.

So I'm $health might output "I'm near death"

<"healthy" | "wounded" | "badly wounded" | "near death">
$leader Will tell you who is currently the leader (Follow The Leader game mode only). Outputs that player's name.

So Defend $leader! might output "Defend New_UrT_Player!"

<text>
$location Your current location on the map. Outputs "unknown" if map does not specify location name.

So Requesting backup at $location might output "Requesting backup at Garage"

<text>
$roundtime Time left in current round, for applicable game modes.

So Hurry! Only $roundtime left! might output "Hurry! Only 30 seconds left!"

<number> <"minutes" | "seconds">
$weapon The name of the weapon you are currently holding.

So I'm defending with $weapon might output "I'm defending with AK103 7.62mm"

<text>
Scripts & Configs