2 players, one level, both have to beat level to advance to next level

Hi folks,

Hoping you can help one of my students. He has 2 players in Level 1. When they both are able to touch an object, he wants them to both move to Level 2.

He’s made an animation of each player disappearing when they touch the object, but I can’t work out what behaviors need to be added to make Level 1 ‘wait’ for both players to touch the object before going to Level 2.

Any help is appreciated!


This is easy.

Have proximity player 1 connect to an AND logic gate
Have proximity player 2 connect to the other plug of the AND gate.

Have a relatively small radar for proximity so they have to stand on the exit.

Have the AND gate go to the Next level node.

The reason I said Proximity instead of Collision, is because Collision only has a short amount of frames when you touch, so when you touch, it’s not permanent, so if you hold against the wall, it only detects that first Collision until you touch the wall again, but Proximity detects you forever as long as you are nearby.

When both players are active on the exit Proximity, the AND gate will activate the next level.

Hey @mskeith - There are a few different ways you could approach this, depending on what specific behavior is desired.

Using the logic posted above by @“Mhx Ar”, the players have to approach the exit and leave the level together.

Here’s a slightly different approach using two switches instead of a logic gate: http://flowlab.io/game/view/885936 - with this approach the players can approach the exit separately.

You can also combine the ideas, so that when a player collides with the exit, it turns on an on/off switch, that has an always going into the in. That switch then connects to the and gate, but since the switch is now turned on, with an always going through it, the player no longer needs to stand next to the exit, and can be destroyed with your student’s animation. When both switches are toggled on, the always from both of them will trigger the and gate, and go to the next level.

@“Mhx Ar” and @grazer: thank you so much! I will go over these methods with my student tomorrow. I really appreciate you both taking the time to help!