Let’s look at another useful trigger ability to be activated by radio. I’m sure you have heard this many times, “Trigger is activated by radio Aplha” etc. And I’m pretty sure some of you have no clue what this means. I know I was like this for a while myself. But I’m pretty sure I have something interesting to add to what most Arma users already know.
So, radio triggers. When radio activation is enabled, trigger area is ignored and so is on deactivation statement. What matters is trigger condition, which has still to return true for on activation statement to execute. Trigger condition is only checked when you activate trigger radio and checked only once. Return false in it and you will stop the trigger from executing on activation statement when radio trigger is activated.
Just to remind what trigger radio is. It is a communication menu which has radio triggers listed. This menu could be accessed via following keyboard shortcut, for example:
0 (zero) -> 0 (zero) -> 3 (Radio Charlie)
You can see communication menu changing with each press of a key, and radio availability depends on whether or not radio trigger has been set up. So let’s set it up:
I assigned Radio Charlie activation to this trigger. So when you press 0 -> 0 you will see “3 Charlie” menu item. Pressing 3 will activate the hint and remove the menu item. And since I set it to be activated only once, the radio menu will become unavailable as there are no more radio triggers. Let’s make a few more:
Now you have 3 triggers set for repeated activation. Pretty simple to set up and use. But you have to remember what radio you set to what. Can the menu items be more descriptive? Yes, they can. There is a command to change default text displayed and it is called setRadioMsg. Yeah, pretty “explicit” name to leave people guessing what it does. Should have been called “setRadioTriggerText” because this is exactly what it does. You can also set this in the editor in “TEXT” field for the trigger.
- <radio> setRadioMsg <menu text>
- <radio> – number from 1 to 10
- Alpha (key 1)
- Bravo (key 2)
- Charlie (key 3)
- Delta (key 4)
- Echo (key 5)
- Foxtrot (key 6)
- Golf (key 7)
- Hotel (key 8)
- India (key 9)
- Juliet (key 0)
- <menu text> – The title shown in the radio menu. “NULL” will remove the menu item from menu, “” will reset it back to default radio name.
Let’s set some custom titles:
Let’s remove Charlie from the menu and set Echo to default:
And is there a way to bring up Radio menu without going trough keyboard sequence every time? Sure it is:
EDIT: You can also use setTriggerText and triggerText to set and get text of the radio menu item. However, while with setRadioMsg the radio index is used to set up custom title, setTriggerText uses trigger object:
In case there are multiple triggers linked to the same radio trigger, in order to set custom title with setTriggerText, you need to know which trigger was placed first and set title on it. For setRadioMsg you do not need to know this.