Hi. I'm currently working on a top down shooter game where the character must traverse through a variety of rooms in a dungeon, defeating enemies. I want to make it so that whenever the player enters a room all the doors will be locked (similar to Enter the Gungeon) until the player kills all the enemies. How do I do this?
There are many ways to do it. You can use an invisible RoomZone sprite. When the player collides with it, close all doors connected to this RoomZone. For example:
Player on collision with RoomZone RoomZone is overlapping Door .. Door set animation to "Closed"
Or instead of overlapping check you can add doors to a hierarchy and pick Door instances which are children to RoomZone.
When the player kills a monster, pick all remaining monsters overlapping RoomZone and if there are none, open the doors.
Develop games in your browser. Powerful, performant & highly capable.
Thanks for the help! I’ll try this out tomorrow