Home   Help Search Login Register  

Author Topic: Combining Triggers  (Read 932 times)

0 Members and 1 Guest are viewing this topic.

Setzer

  • Guest
Combining Triggers
« on: 14 Aug 2003, 16:38:59 »
Q: How do combine 3 triggers to activate a 4th one.  Or better yet i'll give an example

Ex. 3 vehicles, each in their own group being destroyed (or not present) will activate a trigger a trigger

Thanx in advance

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Combining Triggers
« Reply #1 on: 14 Aug 2003, 16:49:55 »
Easy peasy lemon squeazy.

Trigger1

Activation:   as you like, say vehicle not present
On Activation:     1gone=true

Triggers 2 and 3 similarly

Trigger 4

Condition:    1gone and 2gone and 3gone
On Activation:   whatever you like


The secret is variables.    When the variables 1gone, 2gone and 3gone are all set to true, trigger 4 will fire.

You don't have to initialise the variables in your init.sqs.    However, if the game encouters and expression which includes a variable it hasn't met before it assumes the whole expression is false.    Which in this case is fine.     However, if you are making something happen when a variable is false, then you will have to define it somewhere before you want it to do its job.

Initialising variables is easy - you just have to define it to be equal to something.   In this case, if you wanted to initialise these variables, you would put this in your init.sqs

1gone=false
2gone=false
3gone=false
Plenty of reviewed ArmA missions for you to play

Setzer

  • Guest
Re:Combining Triggers
« Reply #2 on: 14 Aug 2003, 17:35:07 »
thanx but I got an error message:
('a1 and a2 and a3':Error and: Type Objec, expected Bool)

this is what I did:

Trigger1
Activation: vehicle not present
On Activation: a1=true

Trigger 2 and 3 same thing (a2=true...)

Trigger 4
Condition: a1 and a2 and a3

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Combining Triggers
« Reply #3 on: 14 Aug 2003, 17:46:56 »
Have you got any units named a2 etc?    The game is expecting a boolean value (true or false) and its getting an object instead.

Check again for spelling mistakes.
Plenty of reviewed ArmA missions for you to play

Setzer

  • Guest
Re:Combining Triggers
« Reply #4 on: 14 Aug 2003, 17:51:05 »
Got it!
Mac thank you for your time patience, and of course help