OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: pexmo on 12 Jan 2005, 11:43:02

Title: How to make trigger 2s condition to be when trigger 1 is activated?
Post by: pexmo on 12 Jan 2005, 11:43:02
I want to have a trigger that only can be activated after a previous trigger has been activated?

I thought i first could do this by moving the trigger to the edge pof the map then move it in to a gamelogic where i want the trigger to be after a previous trigger has been activated. But i didnt find the command for movig a trigger to a GL location.
Title: Re:How to make trigger 2s condition to be when trigger 1 is activated?
Post by: StonedSoldier on 12 Jan 2005, 11:47:15
1st trigger
condition : somecondition
activation : gogogo=true

2nd trigger
condition : gogogo
activation: hint "Trigger Fired"
Title: Re:How to make trigger 2s condition to be when trigger 1 is activated?
Post by: THobson on 12 Jan 2005, 11:51:24
That would fire the second trigger when the first one fires.  To enable the second one to fire only after the first one fires the condition field of the second trigger should be:

this and gogogo

It would also be good practice to intialise gogogo to false at the start of the mission. It will have no impact here but if you were later to create a trigger that fired on the condition
somecondition and not gogogo
you would have a problem if you did not initialise it.

 

Title: Re:How to make trigger 2s condition to be when trigger 1 is activated?
Post by: macguba on 12 Jan 2005, 14:17:07
THobson is right.    To initialise a variable put this in your init.sqs:-

gogogo=false


For the sake of completness, you can move triggers using a setPos command.   For example:-

trig1 setPos getPos GL1

Title: Re:How to make trigger 2s condition to be when trigger 1 is activated?
Post by: Dubieman on 12 Jan 2005, 19:15:49
And another way is to set the dealy numbers in the second trigger. So when gogogo = true, then the trigger waits 5 secs or whatever it is then does what you want it to do.

Oh and if you want to use some OFP code,  && = and ,

cheers
Title: Re:How to make trigger 2s condition to be when trigger 1 is activated?
Post by: THobson on 12 Jan 2005, 22:10:26
I always use
and instead of &&
and
not instead of !  
and
or instead of... what is it ||
I find it easier to read, and remember