OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: marcinko on 23 Feb 2004, 06:16:05

Title: script for detecting radio
Post by: marcinko on 23 Feb 2004, 06:16:05
I want to activate radio commands only if I have a unit from my group carrying BAS_Satcom.   How do I make it that these radio commands are only available if the radio is present with my group?
Title: Re:script for detecting radio
Post by: Marvin on 23 Feb 2004, 10:01:13
To activeate probably you would need to check for weapon like:
player Hasweapon "YourWeapon"

Title: Re:script for detecting radio
Post by: Chris Death on 23 Feb 2004, 10:49:49
And to check, wether one or more units of given group has
such a radio you would say:

{_x hasWeapon "bas_satcom"} count (units groupname) > 0

~S~ CD