Jump to content
Sign in to follow this  
-WKK--SkyQuake

Trigger a 3rd trigger if 1 of 2 triggers = true :)

Recommended Posts

How to do?

Its easy enough to have one trigger beeing activated by another trigger.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">trigger2

condition: trigger1 = true

But how do you trigger a 3rd trigger if one of 2 other triggers is active?

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">trigger3

condition: trigger1 = true or trigger2 = true

dossent work sad_o.gif Ive tried with ( ) around and so on....

Thanx in advance

SkyQuake - not the biggest scripter/coder

Share this post


Link to post
Share on other sites

try it like this...

trigger3

condition: trigger1 == true or trigger2 == true

Without the dbl == around and you were trying to set the trigger1 to be true rather then checking if its true.

Hoz rock.gif

Share this post


Link to post
Share on other sites

Nope - dossent work, get a error sad_o.gif But thanx anyway smile_o.gif

btw. the 3rd trigger is to be synced with a waypoint.

Share this post


Link to post
Share on other sites

This will work , i just tested it in the mission editor before reporting the method here

Here is an example test (of course you will have to change some codes according to your mission , but the concept will remain the same)

Mission : Kill Bob and Jim that are in 2 different places, so a reward message appear

-Create a soldier , name it BOB

-Create a second soldier far away , name it JIM

-Create a 1st trigger

At the line Condition , replace the word "this" by

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">GetDammage BOB >=1

And at the line On Activation, put

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">DEADBOB=true

-Create a 2nd trigger

At the line Condition , replace the word "this" by

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">GetDammage JIM >=1

And at the line On Activation, put

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">DEADJIM=true

-Create the 3rd trigger

At the line Condition , replace the word "this" by

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">DEADBOB and DEADJIM

And at the line On Activation, put

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">hint "GREAT SHOTS"

-change nothing more in the 3 triggers, and you can place them anywhere in the map

And voila, ingame shoot BOB then JIM , it will activate the 3rd trigger that will display the Hint window with GREAT SHOTS in it

Share this post


Link to post
Share on other sites

Well tried it, and it dossent work sad_o.gif And its not the AND-command i want to use, but the OR-command (II)

Ive made a small-scale map triggerprob.Noe.zip trying to show what i need.

I have 2 triggers that can be activated when entered. The 3rd trigger is controling a waypoint and shuld kick in once one of the two other triggers is activated.

SQ

Share this post


Link to post
Share on other sites

1-What i wrote about the "and" trigger example works perfectly , i dont know what you are doing, but it works

2-I downloaded your test mission and i found what you did wrong here

A/ DO NOT PUT the CYCLE waypoint exactly on the M2A2 , it will give an error

Put the CYCLE waypoint near the first waypoint

(i have an error until i delete the CYCLE waypoint and put it near the first waypoint of the M2A2)

B/ If you want your <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">test1 OR test2 to work

*In the trigger -movewesttank1- put

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">test1 = true; test2 = false

instead of only test1 = true

*In the trigger -movewesttank2- put

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">test2 = true; test1 = true

instead of only test2 = true

Notice : you dont need the spaces in test1 = true , you can write test1=true , it will work the same way

If you do exactly that , it WILL work , tested on the editor the tank will continue to move if i enter one of the 2 trigger array.

Share this post


Link to post
Share on other sites

thx will go test it out smile_o.gif

And the AND-command example u gave works yes, but i was refering to my OR-example.

SQ

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  

×