Home   Help Search Login Register  

Author Topic: How to make trigger 2s condition to be when trigger 1 is activated?  (Read 483 times)

0 Members and 1 Guest are viewing this topic.

Offline pexmo

  • Members
  • *
  • I'm a llama!
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.

StonedSoldier

  • Guest
1st trigger
condition : somecondition
activation : gogogo=true

2nd trigger
condition : gogogo
activation: hint "Trigger Fired"

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
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.

 

« Last Edit: 12 Jan 2005, 11:52:30 by THobson »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
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

Plenty of reviewed ArmA missions for you to play

Dubieman

  • Guest
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
« Last Edit: 12 Jan 2005, 19:16:12 by GuiltyRoachKillar »

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
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
« Last Edit: 12 Jan 2005, 23:12:15 by THobson »