Jump to content
Sign in to follow this  
p_siddy

Complex Triggers

Recommended Posts

Hi guys,

I've run into another issue with my training scenario that I am creating.

My problem occurs when you move into one area (trigger 1) to initiate a contact. Contact is dealt with, the team moves on towards area 2 (trigger 2). The team take a massive amount of fire and bound backwards, reactivating trigger1 and thus area 1 and getting sandwiched between lots of angry CSAT.

Now I hear you all slapping your heads going 'that's easy, make it a ONCE only trigger'. However, if I have 3 sections and I want them to go through one section at a time, I need it to repeat.

Now I have a laptop setup to reset the targets and enemy that get spawned. Is there a way I can reset a ONCE trigger within that scripting to be active again? Like a manual repeat. (I have considered using radio triggers BUT that'd mean if a set section wanted to do training, they would need one poor person to follow them triggering the contacts.

Any assistance is welcomed with cookies, and everyone loves cookies!

Share this post


Link to post
Share on other sites

I have a tought like this, if you do a (for example)

_trigger setTriggerActivation ["WEST", "EAST D", false]

again on it, is it resetting?

Share this post


Link to post
Share on other sites

See im new to all this lark, so I would have to jump in and test that out when I have a little more time (im about to go bed and been trying to figure it for a while now). At the moment there are only WEST units in the scenario, so would the EAST part be "PRESENT"?

I've also come up with my own work around using repeat triggers and "_trigger settriggerarea [x,y,angle,rectangle?];" I will make it 0x0 on its own trigger value, so once its triggered it goes to 0x0 and then a trigger at the end of the course that resets all previous triggers to their correct size.

Yet to try this out and see how successful it is but I will do hopefully tomorrow if I have time and see how it goes.

Any quicker ideas will be greatly received.

---------- Post added at 00:24 ---------- Previous post was at 00:15 ----------

Right bed got called off lol.

Your idea works... however.. I will need to set each trigger as repeated trigger. Then within its own OnAct have _trigger setTriggerActivation ["WEST", "EAST D", FALSE]; so that once it triggers it sets itself to not be triggered again.

Then at the end I will need to do another trigger with _trigger setTriggerActivation ["WEST", "EAST D", True] for all of my triggers, 33 in total.

Does that sound about right?

Or will the exact same code work within my Popuptarget.sqf? So when I reset all the targets I can just have all the triggers reset with trigger1 setTriggerActivation ["WEST", "EAST D", True]; trigger2 setTriggerActivation ["WEST", "EAST D", True]; and so on and so forth?

Cheers again.

I really am off to bed now.. leaving for work in.. 5 hours :eek: :(

Edited by P_Siddy

Share this post


Link to post
Share on other sites

The other option is to use a public variable in the trigger (make the condition "this && range1Hot"). The onAct can set the range1Hot to FALSE so it can't be triggered again. Then just rearm the variable with the same script you are using to reset the targets. Works a treat.

Das

ps - forgot to mention, you need to make the trigger repeatable. This just stops it from firing again until you are ready.

Share this post


Link to post
Share on other sites

Could you explain it in a bit more detail? Am I understanding this correctly:

You want to conquer/level/kill anyone on area 1, then move on to the next?

If you fail at one area you move one square back?

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  

×