How to make a condition for going to the next level

How do I make it so that the player has to collect a certain amount of blocks AND collide with a door to go to the next level?

I have tried an AND gate where the two conditions are a switch that turns on when the number is met (filter) and collision, but this does not work.

Don’t use a switch. Have it so when a certain number of object you collect reaches the desired number, it sends a message, (Using filters if equal to) send “complete” to yourself. In your AND gate, when it receives “Complete” and is colling with door (only state the object type only, not the specific name) it will go to next level.

Thanks for the suggestion.
I have it set to go through a filter and if the filter passes, I send the message ‘Complete’ to myself.
I then set up a mailbox to the A condition on an AND gate
When I test it, I can see that the message is working, and I have the second condition to be colliding with the door, but I still dont go to the next level.

See below…am I missing a step?
test

For an AND gate to work, both inputs must be on the same frame.
For your set up to work, it would look something like this:
2020.06.04-17.50

Instead, I would say try something like this:
2020.06.04-17.49

This is simpler and needs less coding