Home   Help Search Login Register  

Author Topic: TRigger trouble  (Read 613 times)

0 Members and 1 Guest are viewing this topic.

Knut Erik

  • Guest
TRigger trouble
« on: 04 Feb 2003, 13:15:06 »
I've got a problem..
I have this mission where you are taken captive. You start in a chopper and is taken to a fieldcamp. I've made a trigger that is activated if "West not pressent". But this script will start at onse because I'm not in the zone before the chopper take me there.
My idea is that when the chopper reaces the waypoint "transport unload", the trigger will become true. But it cant become true!! It must became "this"


HOW DO I DO!
 ??? ??? ???

Offline Ranger

  • Members
  • *
  • Hoo-ah!
Re:TRigger trouble
« Reply #1 on: 04 Feb 2003, 18:31:48 »
In the On Activation field of the Transport Unload waypoint, put the following code:

AtCamp = true

In your init.sqs script (create one if you don't have one), put the following code:

AtCamp = false

In your trigger's Condition field, put the following code:

this and AtCamp

Explanation: As long as the AtCamp boolean is false, the trigger's condition will not be met even though you are not present in the trigger's area.  Once the helicopter's Transport Unload waypoint is activated, the boolean will become true, which will then allow the trigger to check if you are not present in its area.  This will only work if the waypoint drops you off within the trigger's area, though.  Otherwise, the trigger will activate the moment the waypoint is activated, which is not what you want.
Ranger

Pointman

  • Guest
Re:TRigger trouble
« Reply #2 on: 04 Feb 2003, 19:45:13 »
Alternatively create two triggers in the same spot.

the first trigger will set AtCamp = 1 when your player enters. and activated once.

the second trigger will activate on (!(present) && Atcamp)

So you have four scenarios:

Player has not gotten to camp
AtCamp = 0
Present = 0
(2nd trigger (0 && 1) == 0)

Player has reached the camp
AtCamp = 1
Present = 1
(2nd trigger (1 && 0) == 0)

Player leaves the camp again
AtCamp = 1
Present = 0
(2nd trigger (1 && 1) == 1) -- trigger goes off


;;;;;;;;;;; This scenario would be impossible. but still safe
AtCamp = 0
Present = 1
(2nd trigger (0 && 1) == 0)

Knut Erik

  • Guest
Re:TRigger trouble
« Reply #3 on: 06 Feb 2003, 15:00:51 »
Thank you all! You solved my problem!!

Now i can continiue to creat my campaign.
I think i'l relase a demo soon, but for now...
Bye and thanks!
 8)