OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: The-Architect on 10 Mar 2005, 23:06:19
-
I'm using an addon which has a radio as one of the usable weapons. How do I check if a player has the radio and if so/not make using the 0-0-x possible or not possible?
My radio messages are hidden until triggers are hit if that helps.
Cheers.
-
Use a hasWeapon command to check if he has the radio.
Then setRadioMsg either null or text as appropriate.
-
Cheers Macguba.
-
Another question.
How do I check to see if anyone from my group has the radio. I don't want to have to lug it around all the time.
-
I found this in the SEB NAM pack Readme. It should detect if one of the units in your group is carrying the radio.
;start radio check--------------------------
;check for radio
_unitarray= units group player
?("_x hasweapon {sebprc25}" count _unitarray)>0:goto "hasradio"
hint "No Radio present"
exit
#hasradio
Hint "Radio Active"
you will have to change the radio though.
Blip :joystick: