Jump to content
Sign in to follow this  
1para{god-father}

Can i start another trigger from a trigger ?

Recommended Posts

Is there a way I can activate a trigger via another trigger?

i.e if trigger 1 goes off - it then activates another trigger with a timer and when that timer fires is activates another trigger and so on ?

Thanks

paul

Share this post


Link to post
Share on other sites

How I would do it, is, for example:

Trigger1:

Activation: Blahblah

On act: Blah blah blah; Trig1Fired = 1;

Trigger2:

Condition: Blahblah && Trig1Fired == 1;

On Act: Blah blah blah; Trig2Fired = 1;

And so on.

Fill in blahblah with whatever you'd normally have (your own conditions, your own 'on act' stuff, etc. Just add in my stuff too.

This way you can have a chain of triggers!

Share this post


Link to post
Share on other sites

If its for multiplayer, you will need to publicvariable the variables.

Also if you just want to fire another trigger, then you dont need 'Blahblah && Trig1Fired == 1', you just need 'Trig1Fired == 1' then set the timeout or count down.

If its a timer, you prob only want to use countdown as this is best practice for timer trigs.

The timeout has to have the condition true for that amount of time, where as a countdown starts the countdown soon as the condition is met. Not really an issue with variables but unless something else can set the variable back to 0 to reset the condition.

Hope i made sense.

Cheers

GC

Share this post


Link to post
Share on other sites

how would I make Trig1Fired a publicvariable then ?

set it in the init.sqf ?

like

publicvariable Trig1Fired,Trig2Fired, etc.. ?

thanks

paul

Share this post


Link to post
Share on other sites

Just add

 
publicVariable "Trig1Fired";

to your activation command sequence. It just makes sure that all the clients in your MP mission get told you changed the value of that variable. Do that for each variable you want to share across machines.

Share this post


Link to post
Share on other sites
If its for multiplayer, you will need to publicvariable the variables.

Also if you just want to fire another trigger, then you dont need 'Blahblah && Trig1Fired == 1', you just need 'Trig1Fired == 1' then set the timeout or count down.

If its a timer, you prob only want to use countdown as this is best practice for timer trigs.

The timeout has to have the condition true for that amount of time, where as a countdown starts the countdown soon as the condition is met. Not really an issue with variables but unless something else can set the variable back to 0 to reset the condition.

Hope i made sense.

Cheers

GC

I only meant that in the event that he wanted additional conditions, such as the player being in vehicle X AND the first trigger having already been fired.

Hope this thread clears it up for you, psvialli :)

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  

×