OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: The Vulcan on 15 Sep 2007, 05:10:15
-
Attached to radio trigger Alpha....
thislist exec "radiomenu.sqs"
me = _this select 0
~0.2
IID = me addaction ["menu option 1","menu1.sqs"]
IID = me addaction ["menu option 2","menu2.sqs"]
IID = me addaction ["menu option 3","menu3.sqs"]
IID = me addaction ["menu option 4","menu4.sqs"]
IID = me addaction ["exit","exit.sqs"]
endthis=true
@!endthis
me removeaction IID
exit
QUESTION-1
Once the user selects one of the menu options, how do I remove the menu from the screen instantly ?
QUESTION-2
I only want the radio channel to be avaibile once so its trigger is set to "once".
However if they select "exit" and don't call on the radio function, I need to reset the Radio trigger to "once" so that they can call on it again later.
How would I code that ?
Thanks for any link or tips. :good:
-
me = _this select 0
~0.2
IID1 = me addaction ["menu option 1","menu1.sqs"]
IID2 = me addaction ["menu option 2","menu2.sqs"]
IID3 = me addaction ["menu option 3","menu3.sqs"]
IID4 = me addaction ["menu option 4","menu4.sqs"]
IID5 = me addaction ["exit","exit.sqs"]
endthis=true
@!endthis
me removeaction IID1
me removeaction IID2
me removeaction IID3
me removeaction IID4
me removeaction IID5
exit
Dont understand your second question.
-
Question 2:
You mean that they can only select one option from 1-3 once, but they can do it whenever? Easy enough ->
Make the trigger "repeatedly".
Inside each of the "menu#.sqs" scripts, put something like this:
0 setRadioMsg "NULL"
Now, the number in front (in the example above '0') corresponds to the radio message number. So Radio Alpha is 0, Radio Bravo is 1 etc. Anyway, what the above command will do is simply make the radio disappear and be unusable. :)
If you want to use the same channel later, you'll have to play around with conditions and stuff, but for the easy use, the above is how to do it!
Good luck!
Wolfrug out.
-
I seem to recall that the radio messages are numbered from 1 onwards and not 0, unless things have changed in ArmA.
Planck
-
Thanks for the response guys.
Ok I am not getting very far with this. :dunno: (only been in the editor for a few days)
I am trying to change Mr-Murray's Arti example to suite my needs.
I want to set the radio as follows.
- Alpha = Fire Mission 1
- Bravo = Fire Mission 2
- Charlie = Fire Mission 3
When you call say Alpha.
You get the on screen menu.
- Call Alpha Fire Mission
- Disregard
- If you select Call Alpha Fire Mission. = You then click on the map to set your target and Radio Alpha becomes greyed out.
- If you select Disregard. = Radio Alpha is reset to availible.
At the moment I have 2 problems.
1. Calling the script from the radio doesn't bring up the menu. (his is attached to a when present trigger)
2. When there is more then one option in the menu, the menu isn't removed after making a selection.
I have attached the file I am working with.