Home   Help Search Login Register  

Author Topic: detecting radio to access a script?  (Read 812 times)

0 Members and 2 Guests are viewing this topic.

marcinko

  • Guest
detecting radio to access a script?
« on: 24 Nov 2003, 23:45:15 »
I was wondering how to set up a mission so that the game will have to detect a player in my unit is carrying an order before I can do certain things withing the mission like call for an extraction.  I know they do it in the spt_pack but I don't want to have all the other options and I want it for the BAS radio and BAS choppers.  Any Ideas?

m21man

  • Guest
Re:detecting radio to access a script?
« Reply #1 on: 24 Nov 2003, 23:53:05 »
Kind of a fuzzy question, maybe you could clarify it. If you're trying to detect whether a unit has a radio signal available, then you might use a variable:
When adding the message:
Code: [Select]
1 setradiomsg "Do Something"
signal = 1

When removing the message:
Code: [Select]
1 setradiomsg "null"
signal = 0

That way, whenever you want to detect if a unit has the message available, you just check to see what the value of the variable signal is.

marcinko

  • Guest
Re:detecting radio to access a script?
« Reply #2 on: 25 Nov 2003, 04:58:48 »
Sorry, I'll try to be more clear.  I want to be able to call for an extraction by helicopter only if someone in my unit is carrying a radio.  If the radioman is killed and no one picks up the radio, I don't want to have the option of calling for a helo extraction, because you couldn't do that w/o a radio.  I want to know how I can get the game to detect if my unit has a radio in it and that will allow different options as far as extraction and other support units.  If no radio, the player will have to find other means of extraction using his own imagination.  I hope this is a little clearer.

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:detecting radio to access a script?
« Reply #3 on: 25 Nov 2003, 05:55:51 »
"_x hasWeapon {BAS_satcom}" count (units groupname) > 0

in a trigger

and:

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

in a script

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted