Jump to content
Sign in to follow this  
Longbow194

Activating a Trigger with a trigger

Recommended Posts

Hi All,

After using the search and Wiki I find I have to ask this question.

A brief outline:

A trigger (T1) is set to activate when all OpFor in its area are dead. This will send the player a radio message from CROSSROAD with some more mission info. I need the trigger T1 to also activate the movement of some OpFor armour to act as a counter-attack.

I have a second trigger (T2) stopping the OpFor at a waypoint. When T1 is activated the radio message is sent but the OpFor refuse to budge.

After reading the search results and the Wiki I can only assume that I am doing something simple incorrectly. Many thanks in advance for any help you can offer.

Share this post


Link to post
Share on other sites

You should be able to achieve that with only one trigger. Synchronize the waypoint at which the OPFOR are to wait with trigger T1.

But, in general, a trigger can be activated by another trigger by using a global variable (GV). The parent trigger (the one which will activate the other) will declare the GV in it's on activation code.

The child trigger(s) have a condition that includes the GV state. Combining trigger "this" conditions with GVs can create quite powerful conditions and effects.

eg :

parentTrigger - On Act : "allGo = true"

childTrigger - Condition : "allGo"

Share this post


Link to post
Share on other sites

This is very similar to my current dilema. Fasad you seem to have a good solution, would it work in my case...am I makeing things overly complicated?

Premise:

Base fulla baddies, kill the officer.

One trigger is set to unleash hell if Blufor is detected upon their approach.

The other is set to do the same once the officer is killed.

My problem is having the either or situation. I can link the same units to both triggers, but that still requires that they both be true.

How do I get it so when one is activated, the other is no longer valid...or null or something?

In one trigger I have:

Condition: !(Alive hos1) and this and (not var1)

onactivation: var2=true

The second trigger:

Condition: this and (not var2)

onactivation: var1=true

Share this post


Link to post
Share on other sites

Why don´t you just delete the trigger you no longer need with OnActivation line ?

As soon as one trigger fires you could remove the other one on the fly to avoid problems.

Share this post


Link to post
Share on other sites

If you just want either of the two conditions to set off some reinforcements arriving, you'll only need one trigger.

Set it to <playerSide> detected by <enemySide>.

and in the condition box: "this OR !(alive officerName)"

Share this post


Link to post
Share on other sites

That is wonderful fasad!  I had a feeling I was overcomplicating things.  

I had wanted 2 different messages:

"enemy alerted to your presence." or

"Officer killed."

but I am perfectly happy with just having a working trigger.

That was a big help, hope I can repay the favor some time.

Big Thanks!  notworthy.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×