Vultr.com - Instant Cloud Server Deployment
ANONYMOUS PREDATORS 5 MEMBERS:
Home
News
Share on Facebook
Share on Twitter
Share on Google+
grizzamPM
#1
Binding
Jan 28, 2009 5:10 PM
.:AnP:. -GRIZZAM- 15 Senior Admin - Joined: Jan 13, 2009
Posts: 285
Bindings are a way for you to assign keys certain jobs. This may be done by using the in game console, or the autoexec.cfg file.

Using the console method means your bindings are lost once you exit the game. The better method is to use the autoexec.cfg file found in your UrbanTerror\q3ut4 directory. It can be read like a standard TXT file and any bindings entered and saved inside it are automatically loaded whenever you start Urban Terror.

There are many advanced things you can do with bindings (a subset of scripting) and I've only just scratched the surface of them... But one very common practice is to bind a string of text to a certain key, or even bind said string of text along with a radio call.

- - - - ex. bind f3 "ut_radio 3 3 Dammit, I'm hit! I'm at $location and $health!"

This (on hitting F3) would send the radio call "[radio key], 3, 3" (I need a medic!), but instead of the usual text that accompanies it, the custom string you entered will be sent.

You'll notice the strange words $location and $health. These are known as string variables. So, if you were to see the above binding actually used in game, the end result of the string might be something like "Dammit, I'm hit! I'm at the well and near death!", depending on your status.

One thing to note: when you see "//" in your autoexec.cfg file it means any code written after will be ignored. This is useful for keeping track of lengthy bindings that include multiple string variables.
----------

String Variables:

$crosshair - Displays the location your crosshair is targeting.
$location - Displays your location.
$health - Displays your level of health.
$weapon - Displays the weapon you have equipped.
$clips - Displays the number of clips remaining for your equipped weapon.
$bullets - Displays the number of bullets in your clip.
$gameitem - Displays the word "flag" in the CTF game type.
$leader - Displays the leader.
Last edited by: grizzam Feb 08, 2009 1:35 PM
grizzamPM
#2
Feb 08, 2009 1:33 PM
.:AnP:. -GRIZZAM- 15 Senior Admin - Joined: Jan 13, 2009
Posts: 285
Binding Radio Commands

Radio messages can be played through the user interface by having a key bound to ut_radio. or played through key bindings in .cfg files. To bind a key to play a specific message, use this example:

/bind x ut_radio y z

In the above example 'x' equals the key you press to play the sound, 'y' equals the menu number of the radio command and 'z' equals the sound file within that menu. The menus and radio commands are numbered 1 to 9.

The first menu in Radio Command Chart is 'Menu 1' or "Responses", so the number for a radio command within responses would '1' . This also means that inside the "Responses" menu the same rules apply. The first sound is "Affirmative", so that sound is designated 1.

So if we wanted to bind a key to play the sound "Enemy spotted", found in Menu 5 - Enemy Activity, we would type the following in the console:

/bind x ut_radio 5 1

Remember, 'x' still equals the key you want bound and that you need a space between ut_radio and the first number - along with a second space between the first and second numbers.

While radio calls can be effective, combining a radio call with text and a string variable is possible.

/bind x ut_radio 3 3 I need a medic! [$health]

This bind, while a bit more advanced takes a radio call, displays the words "I need a medic" and also displays the remaining percentage of health (string variable) of the gamer. This is just one example of how you can combine the different pieces in order to create unique radio calls.

There are different radio messages for males and females. The meaning behind the messages is the same for both male and female, but the female voice will often say different things.
grizzamPM
#3
Feb 08, 2009 1:34 PM
.:AnP:. -GRIZZAM- 15 Senior Admin - Joined: Jan 13, 2009
Posts: 285
Menu 1 Responses
ut_radio 1 1 Affirmative.
ut_radio 1 2 Negative.
ut_radio 1 3 I'm on it!
ut_radio 1 4 Area secured.
ut_radio 1 5 Base is secure.
ut_radio 1 6 Medic on the way, hang in there.
ut_radio 1 7 I've got your back.
ut_radio 1 8 Enemy terminated.

Menu 2 Orders
ut_radio 2 1 Move in.
ut_radio 2 2 Fall back and regroup!
ut_radio 2 3 Hold your position.
ut_radio 2 4 Stick with me.
ut_radio 2 5 Cover me.
ut_radio 2 6 Requesting backup.
ut_radio 2 7 Go for the objective.
ut_radio 2 8 Flank them!
ut_radio 2 9 Double time, let's move!

Menu 3 Conditions
ut_radio 3 1 I'm moving in.
ut_radio 3 2 Awaiting orders.
ut_radio 3 3 I need a medic!
ut_radio 3 4 Objective in sight.
ut_radio 3 5 Objective is clear.
ut_radio 3 6 I'm attacking.
ut_radio 3 7 I'm defending.
ut_radio 3 8 I'm flanking.
ut_radio 3 9 Holding here.

Menu 4 Queries
ut_radio 4 1 Status?
ut_radio 4 2 Objective status?
ut_radio 4 3 Base status?
ut_radio 4 4 Where's the enemy?
ut_radio 4 5 Where are the medics?
ut_radio 4 6 Anyone need support?
ut_radio 4 7 Anyone need a medic?
ut_radio 4 8 Who's ya daddy?
ut_radio 4 9 How the hell are ya?

Menu 5 Enemy Activity
ut_radio 5 1 Enemy spotted.
ut_radio 5 2 Enemy heard.
ut_radio 5 3 Enemy is flanking!
ut_radio 5 4 Enemy headed your way!
ut_radio 5 5 Incoming!
ut_radio 5 9 Objective in danger!

Menu 6 Directional
ut_radio 6 1 North.
ut_radio 6 2 South.
ut_radio 6 3 East.
ut_radio 6 4 West.
ut_radio 6 5 base.
ut_radio 6 6 High.
ut_radio 6 7 Low.
ut_radio 6 8 Water.
ut_radio 6 9 Here.

Menu 7 Capture the Flag
ut_radio 7 1 I've got the flag.
ut_radio 7 2 I'm going for the flag.
ut_radio 7 3 They have our flag.
ut_radio 7 4 Base is being overrun!
ut_radio 7 5 Recover the flag!
ut_radio 7 6 Flag exiting left.
ut_radio 7 7 Flag exiting right.
ut_radio 7 8 Flag exiting front.
ut_radio 7 9 Flag exiting back.

Menu 8 Bomb
ut_radio 8 1 Heading to Bombsite A.
ut_radio 8 2 Heading to Bombsite B.
ut_radio 8 3 Enemy at Bombsite A.
ut_radio 8 4 Enemy at Bombsite B.
ut_radio 8 5 I have the bomb.
ut_radio 8 6 The bomb is loose!

Menu 9 Miscellaneous
ut_radio 9 1 Good job team.
ut_radio 9 2 Nice one.
ut_radio 9 3 Check your fire!
ut_radio 9 4 Sorry about that.
ut_radio 9 5 Whatever.
ut_radio 9 6 No problem.
ut_radio 9 7 Oh, you idiot!
ut_radio 9 8 What the f*ck, over?
ut_radio 9 9 Thanks.
grizzamPM
#4
Feb 08, 2009 1:35 PM
.:AnP:. -GRIZZAM- 15 Senior Admin - Joined: Jan 13, 2009
Posts: 285
Colour:

On top of all this there is also a more frivolous aspect to these text strings, and that's colour coding. Making different parts of your text different colours can both look good but also help highlight the important bits (ie. location, health, etc.). There are eight different colours to choose from and each one is used by first typing the "^" character then the corresponding number immediately before the word.

So, if I were to repeat the previous example with colour coding present...
eg. bind f3 "ut_radio 3 3 ^5Dammit, ^2I'm hit! I'm at ^6$location ^2and ^6$health^2!"

It may look even more confusing than before, but the end result is worth it. Try it out yourself.

----------

Colour Codes:

Red - - - ^1
Green - - ^2
Yellow - ^3
Blue - - - ^4
Cyan - - - ^5
Magenta - ^6
White | - - ^7
Black | - - ^8

----------

Important Bindings:

bind b "ut_itemdrop flag" //drops the flag
bind 0 "ut_itemdrop kevlar" //drops the kevlar - Can "Toss" is to a teammate
bing g "ut_itemdrop medkit" //drops the Medkit - Can "toss" it to teammate
bind u "messagemode3" //speak to only who's under crosshair, at moment you press U
bind i "ut_radio lol" //makes your character laugh, cycles through 3
seta cg_autoradio "2" //change value to 2, to hear laughter

Advanced bindings:

Here is a combination, that includes 2 lines of text, an action, string variables, and colour.
bind = "say_team ^5I'm Dropping the Flag; ut_itemdrop flag;wait;wait;wait;wait;say_team ^5Flag Dropped at $location"
Last edited by: grizzam May 25, 2009 3:39 PM