Jump to content
Sign in to follow this  
CaptainBravo

How to limit a trigger?

Recommended Posts

Hey everyone,

I was wondering if anyone knows how to:

- A Radio Trigger only becomes active after a certain objective achieved?

- Only certain side has access to radio (west, east, ..)

Thanks the help in a advance. :)

Share this post


Link to post
Share on other sites

You can use setRadioMsg to "disable" a radio trigger, by using

1 setRadioMsg "NULL"

This will set the Text of the Bravo trigger to an empty string and thus disable it (you can't select it in the command menu or map radio). You can re-activate it with

1 setRadioMsg "Your text to display"

I've read in Arma2 the radio actually is an inventory object, so if you remove the radio from every east unit they shouldn't be able to use it. However they won't be able to use sideChat etc. too I think.

Share this post


Link to post
Share on other sites

Thanks for the response zwobot. I actually meant the trigger radio, so Trigger set to Alphha (0-0-1) will be hidden till certain objectives achieved.

For example I want to have a trigger to call chopper for pick up, but only after an objective is done. So player will not have option to call chopper till he has achieved his objectives.

On the other hand, I want an east commander to also have similar trigger radios hidden till certain objectives are done.

And East can not see west options and opposite is true.

I hope that makes sense.

Share this post


Link to post
Share on other sites

You can create triggers programatically, and also triggers you create yourself can be deleted with deleteVehicle. I don't know how this works in multiplayer, but I think it's probably a case of running it on the clients you want to be able to access the radio commands, and not running it on the others.

  _trigger = createTrigger ["EmptyDetector", getPos leader blufor_squad_2];
 _trigger setTriggerActivation ["ALPHA", "NONE", false];
 _trigger setTriggerText "Hammer move to North";
 _trigger setTriggerStatements ["this", "nul = 'north' execVM 'blufor\squad2go.sqf'", ""];
 squad_2_north_trigger = _trigger;

This creates radio trigger "ALPHA", changes to the text to something more meaningful, and sets the statements to run when it's activated. The last bit is setting a global variable so I can delete the trigger later. Since the third parameter to setTriggerActivation is false (i.e. non-repeating trigger), when this is activated it will automatically disable itself. Also, the position of the trigger doesn't matter for a radio trigger, but I guess you have to specify something...

As mentioned, you can delete a trigger you've created using deleteVehicle, e.g.

deleteVehicle squad_2_north_trigger

would remove that one.

Share this post


Link to post
Share on other sites
Thanks for the response zwobot. I actually meant the trigger radio, so Trigger set to Alphha (0-0-1) will be hidden till certain objectives achieved.

The setRadioMsg command does just that if I'm not mistaken.

1 setRadioMsg "NULL"

will hide the trigger from the radio menu (0-0-1)

1 setRadioMsg "Some text"

Should display it again with "Some text" as the label.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×