Home   Help Search Login Register  

Author Topic: Triggers in order  (Read 1220 times)

0 Members and 1 Guest are viewing this topic.

robertfox7

  • Guest
Triggers in order
« on: 06 Oct 2002, 10:56:58 »
 ;D :o ;D i am trying to make a mission sorta like a action and mind game all in one to were the player will have to go all over a island stealing cars,tanks,choppers ect...and solving puzzles decrypting codes and fighting.... you get the picture.

now my question is if i have 50 triggers and i want them to activate in a certain order  (like after #1 has been activated then #2 and only #2 can be activated ect...) that way a player cant just go around the island tripping off triggers that are not to set off yet.

hope i have explained enough. and tell me if you think the idea of a map like this is a good idea. ty for all your help ofpec ;)

walker

  • Guest
Re:Triggers in order
« Reply #1 on: 06 Oct 2002, 12:37:46 »
Hi

Add to the activation field of each preceding trigger a variable that equals true.

So in trigger 1
firstdowojamit = true

in the condition field of the next tigger put
this && firstdowojamit  == true

in its activation field
Seconddowojamit = true

etc. etc.

That should work you my need to add extra triggers for some conditions as the "this &&" tends to work in strange ways ???

I get round it by having two variables set in two triggers
firstdowojamit1  = true
firstdowojamit2 = true

Then a third with a condition field
firstdowojamit1 == true && firstdowojamit2 == true

in its activation field
Seconddowojamit = true

It sounds like your doing something similar to the Crime MOD or one of the RPG MODs

Kind Regards walker
« Last Edit: 06 Oct 2002, 12:41:36 by walker »

seanver

  • Guest
Re:Triggers in order
« Reply #2 on: 06 Oct 2002, 12:42:02 »
Hmmm ok let's say you have 3 triggers, and you want number 1 to activate first but you don't want 2 or 3.

Make the #1 as you want. But in its On Activation field put, after the code you wanted to put, "trig2=true".

Now create the trigger #2, put its condition line. For example let's say you want the player to be at a certain place, so make the trigger over the area, group it with the player and now, in the condition line of the trigger you'll see "this", then add AND trig2, so it will be "this AND trig2"

In the On Activation line of the trigger put whatever you want, for example hint "Hellooo" and then add at the final "trig3=true": hint "helloooo"; trig3=true.

Now create the next trigger, put the condition line you want and add "AND trig3". You get the idea?

robertfox7

  • Guest
Re:Triggers in order
« Reply #3 on: 07 Oct 2002, 05:58:14 »
it does not work  8)

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Triggers in order
« Reply #4 on: 07 Oct 2002, 12:39:28 »
robertfox7, the principle does work, so maybe you have a typo somewhere.    What do you mean "it doesn't work"?   What actually happened?    

Anyway, here's my version of the same thing:  I'm really just repeating what SeAnVeR and walker said but in different words.    With this system a trigger will only activate if all previous triggers have been fired.

Trigger1
condition:  this
on activation:    trig2=true

Trigger2
condition:   this and trig2
on activation:    trig3=true

Trigger3
condition:   this and trig3
on activation:    trig4=true

etc.

If you copy and paste these into your triggers it should work.
Plenty of reviewed ArmA missions for you to play

Bremmer

  • Guest
Re:Triggers in order
« Reply #5 on: 07 Oct 2002, 14:51:32 »
Ugh!

What ugly solutions you guys have come up with  ;)

My suggestion :

Initiate a global variale in an init field or file ActiveTrigger = 1
Create all the triggers you need, and in their condition fields put the condions you want and ActiveTrigger == 1. Obviously you need to change the number to whatever order you want the trigger to go off in.
Also - in the On Activation field of each trigger put ActiveTrigger = ActiveTrigger + 1.

eg. for your fifth trigger you might have:

Condition :(player distance car < 10) and (ActiveTrigger == 5)
On Activation:Hint "Get in the car"; ActiveTrigger = ActiveTrigger + 1

And for your sixth trigger:

Condition :(player in car) and (ActiveTrigger == 6)
On Activation:Hint "OK - Now drive really fast!"; ActiveTrigger = ActiveTrigger + 1

Good luck

« Last Edit: 07 Oct 2002, 17:57:34 by Bremmer »

walker

  • Guest
Re:Triggers in order
« Reply #6 on: 07 Oct 2002, 19:29:48 »
Hi Bremmer

Your solution is better ;) But most times I can not be bothered to waste brain cells on triggers I just bang it together and concentrate on improving the missions game play.

Nevertheless you solution is far more flexable you could use it to reset triggers and add blind alley solutions. You could use powers as well to construct a tree solution from it this would allow multiple routes to problem.

Kind Regards walker
« Last Edit: 07 Oct 2002, 19:32:00 by walker »