Co_Op trigger

Avatar
baca25
342 Posts
Posted Jun 25, 2011
I have spent all night trying to figure out how to get a trigger to activate when both players touch the trigger, and do whatever action I want them to do. So for instance, when both players touch the area where I want this trigger, I want a moveable panel to start its animation; however, I do not want that animation to start if only one player is at that area. I also don't want, when one player gets to that area and then leaves, then the other player goes to that area and activates the trigger. I have tried many different ways, and have stared at other puzzles and instances that the game made, and have looked on multiple forums, but I cannot figure this on out. :notwant:
Advertisement
Registered users don’t see ads! Register now!
Avatar
Darkylight
81 Posts
Posted Jun 25, 2011
Replied 45 minutes later
._., XD, all night.

Make a trigger_playerteam and one math_counter, when player blue touch trigger, math_counter add 1, if he end touch, subrast 1, same for the orange, and in math counter put maxhit for 2, now, the output is "Onhitmax" do what you want.

Avatar
Marlovious
111 Posts
Posted Jun 25, 2011
Replied 23 minutes later
I believe you want to use a logic_coop_manager and trigger_playerteam. Look at the "instances/coop/coop_team_double_exit_door.vmf" instance to see how it works.
Avatar
baca25
342 Posts
Posted Jun 26, 2011
Replied 20 hours later

Darkylight wrote:
._., XD, all night.

Make a trigger_playerteam and one math_counter, when player blue touch trigger, math_counter add 1, if he end touch, subrast 1, same for the orange, and in math counter put maxhit for 2, now, the output is "Onhitmax" do what you want.

Well, thank you. Works great. I don't like it when something so simple caused me so much pain.

Avatar
ChickenMobile
2,460 Posts
Posted Jun 26, 2011
Replied 1 hour later

Marlovious wrote:
I believe you want to use a logic_coop_manager and trigger_playerteam. Look at the "instances/coop/coop_team_double_exit_door.vmf" instance to see how it works.

This is the better solution. The logic_coop_manager is made especially for firing outputs when both players touch a trigger etc.

Avatar
Darkylight
81 Posts
Posted Jun 26, 2011
Replied 1 hour later

chickenmobile wrote:
Marlovious wrote:

I believe you want to use a logic_coop_manager and trigger_playerteam. Look at the "instances/coop/coop_team_double_exit_door.vmf" instance to see how it works.

This is the better solution. The logic_coop_manager is made especially for firing outputs when both players touch a trigger etc.

Yep, math_counter is simillar but for 1 or more conditions.

Advertisement
Registered users don’t see ads! Register now!
Avatar
Vordwann
767 Posts
Posted Jun 26, 2011
Replied 41 minutes later
SolarChronus did a good tutorial on one chain and multiple chain uses of the Co-op manager here: http://www.youtube.com/watch?v=lOUav5ipkyU