Jump to content
Sign in to follow this  
Aeviv

Triggering triggers with triggers

Recommended Posts

Im trying to run a scenario where two player teams (single player mission mind) are operating independantly, but need to secure an area each before they a cleared to move to the next one.

Say team A secure the airbase, with a trigger of 'Opfor NOT PRESENT' named T1, while Team B secure the village, trigger 'Opfor not present, named T2

Once both of these triggers have been activiated, i want this to trigger a third trigger, T3, which will restock the teams on ammo and heal them, as well as telling them to proceed to the next waypoint.

I thought i would do this by placing T1=true;T2=true; in the condition bar of T3, but no avail. Can someone please help me out here?

Share this post


Link to post
Share on other sites

"=" is an assignment operator. E.g. this sets "myVar" to the value 3:

myVar = 3;

"==" is an equality operator. E.g. this checks if "myVar" has the value 3:

if(myVar == 3) then { hint "Yes."; } else { hint "No."; };

But, to test against true/false values, you don't need to use the equality operator. So, to test if "myVar" is true, you'd use:

if(myVar) then { hint "True."; } else { hint "False."; };

Furthermore, we can use the "triggerActivated" command and, so, what you're looking to put in your condition field is:

(triggerActivated T1) AND (triggerActivated T2)

Edited by JamesF1

Share this post


Link to post
Share on other sites

Love the title so i reply :bounce3:

You should use the function "triggeractivated". For example, when t1 is activated, the command "triggeractivated t1" becomes true.

So you can put this as condition of your third trigger :

(triggeractivated t1)&&(triggeractivated t2)

Share this post


Link to post
Share on other sites

Ahh very simple now you pointed that out, thanks for the help!

Share this post


Link to post
Share on other sites
So, what you're looking to put in your condition field is:

(triggerActivated T1)==true AND (triggerActivated T2)==true

Lol? Using a comparison operator to check booleans?

Redundancy... :j:

Share this post


Link to post
Share on other sites
Lol? Using a comparison operator to check booleans?

Redundancy... :j:

Of course, but as you may have gathered by my post, I was attempting to make the explanation as simple as possible for the OP.

But if it matter to you so much, I've updated my post with more explanation so that not using comparisons on booleans is no longer an 'invisible' step ;)

Edited by JamesF1

Share this post


Link to post
Share on other sites

@ JamesF1 : editing your post without crediting me isn't fair. Not a nice way to behave here.

Share this post


Link to post
Share on other sites

Why would I credit you when I fixed my own 'mistake' independently of your post? If I'd sourced the command usage or whatever from your post, then I'd have credited you... but I didn't, so I didn't.

Edited by JamesF1

Share this post


Link to post
Share on other sites
Why would I credit you when I fixed my own 'mistake' independently of your post? If I'd sourced the command usage or whatever from your post, then I'd have credited you... but I didn't, so I didn't.

I see. Congratulations.

Share this post


Link to post
Share on other sites
Lol? Using a comparison operator to check booleans?

Redundancy... :j:

It's not just redundant, it will also throw an error.

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  

×