well we all know how to make a CollisionEnter2D script attached to a switch wich allows the door to open for example , but is there a way to use two CollisionEnter2D , i mean you have to collide with 2 switches ( 1 by the player and the other by a box for example) to open the door ?
Yes, you could have X number of switches needed to open a door. The door needs to hold a list of the switches that needs to be pressed to open the door, and then the door checks if the switches are “activated”. If they are, open sesame! I don’t know how you use the collisionenter2D, but I’m guessing that you activate the switch there. Just add the same type of function (collisionenter2D) with a box as with your player to activate the other switch.
thanks man, i’ll try it out