OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started 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.
-
1st trigger
condition : somecondition
activation : gogogo=true
2nd trigger
condition : gogogo
activation: hint "Trigger Fired"
-
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.
-
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
-
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
-
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