Jump to content
Sign in to follow this  
vonsteimel

How to limit the # of times a trigger can be activated

Recommended Posts

Greetings,

I've got 3 related trigger questions to which I couldn't find any existing answers. There are no specific situations that I'm trying to apply them to, I've just got several missions I could use these features in if I could figure out how to make them work...

1. I'm wanting to know how to limit the number of times a trigger can be activated... Right now it's either "once" or "repeatedly"... I want a trigger to go offline/stop activating after it's conditions have been met X amount of times....

2. Is there a way that another trigger can null/deactivate a different trigger? Say that a trigger "A" will be online continuously activating when its conditions are met, until another trigger "B" is activated, then the first trigger "A" goes offline/stops activating...

3. Also how to make a trigger wait unit its condition is met a certain number of times before it is activated? So that a trigger will wait to execute the "activation" script until its conditions have been met X amount of times.... (one example: say I've got an IED rigged to a "present" trigger, but I don't want the trigger to activate the IED script until X number of units have passed it)

All input will be appreciated.

Thanks,

VS

Share this post


Link to post
Share on other sites

You think of triggers in a wrong way. Don't think you want to "stop activating after its condition has been met X amount of times". Instead focus on the conditions, and let the condition become true only when you want to activate the trigger.

All three of your questions can be solved with variables (and maybe one or two more triggers that sets the variables).

For example answer to question 1:

Condition: grenadeHitTarget && grenadesHitCount < 3

Activation: grenadesHitCount = grenadesHitCount + 1

This trigger will be activated three times, because after that the condition will never again be met (unless grenadesHitCount is reset)

Of course all your variables should also be reset initially in init.sqf.

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  

×