Jump to content
Sloppy Noodl3

Trigger enabling a trigger?

Recommended Posts

Hello everyone I have run into a problem that I cannot find a solution for. I have done some research and come close to finding the solution but still no cigar.

I am still a noobie when it comes to all this but I am trying.

Essentially I am trying to have one trigger enable another trigger similar to the post I found below on reddit.

 

If you see the attached picture on IMGUR I posted, this is exactly what I am trying to do. It helps if you read my post side by side with the picture open.

When Soldier1 dies Trigger1 is fired revealing Soldier2. Then when Player1 OR  Player2 walk into Trigger2 Trigger3 is fired revealing Soldier3. Essentially the final result is Soldier2 and Soldier3 are both now revealed but only after you or your squad members walk into Trigger2 does Soldier3 appear. This is useful when in a mission your player or squad is aware of Soldier2 and then tries to flank Soldier2 and then Soldier3 pops up and attacks you.

 

https://imgur.com/a/54zP0rw

 

Trigger3 is simple and relies on the two triggers before it being activated.

The condition for Trigger3 is this.

 

Condition: triggerActivated Trigger1 && triggerActivated Trigger2;

 

 

My problem is with Trigger2.

Here is the problem I do not want soldier3 to be revealed until after soldier1 is dead AND THEN a member of your squad (Player1 or Player2) is detected in Trigger2 trying to flank Soldier2.

The reason for this is simple I don't want Trigger2 to be activated too early in the game when a friendly unit walks into it. This would reveal Soldier3 too early in the mission if Player1 or Player2 walked into Trigger2 before Trigger1 fired.

 

So the solution seems to be as follows which I found on the reddit post. Trigger2's condition is as follows.

 

Condition:

 

(triggerActivated trigger1) && Player1 in thisList && Player2 in thisList;

 

Now this works but only when both Player1 and Player2 are BOTH in the trigger together.

How do I make this work when EITHER its Player1 or Player2 in Trigger2?

This is important as some members of your squad may be dead and you don't want to make this trigger require your entire squad present.

 

 

 

 

 

 

 

Share this post


Link to post
Share on other sites

Try this:

 

(triggerActivated trigger1) && player1 in thisList OR (triggerActivated trigger1) && player2 in thisList;

Share this post


Link to post
Share on other sites
15 minutes ago, jonipetteri said:

Try this:

 

(triggerActivated trigger1) && player1 in thisList OR (triggerActivated trigger1) && player2 in thisList;

 

Thank you for the reply unfortunately this did not work. Here is the error message.

 

https://imgur.com/a/hYyC2PP

Share this post


Link to post
Share on other sites

If I try the following.

 

(triggerActivated trigger1) && Player1 in thisList OR Player2 in thisList;

 

This works only for Player1. If Player2 enters Trigger2 too early (big concern) and comes back out and kills Soldier1(setting off Trigger1 revealing Soldier2) Soldier3 appears instantly at the same time that Soldier2 appears even though Player2 has not entered Trigger2 at the appropriate time like when trying to flank Soldier3. All of this is because Player2 triggered Trigger2 too early.

Share this post


Link to post
Share on other sites

Stay logic!

triggerActivated trigger1 && (Player1 in thisList OR Player2 in thisList)

  • Like 3

Share this post


Link to post
Share on other sites
7 minutes ago, pierremgi said:

Stay logic!

triggerActivated trigger1 && (Player1 in thisList OR Player2 in thisList) 

 

You saved the day again lol thank you so much this works. You also helped me on my first post 😄.

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

×