Creating a locked door
As we learned in the Drawing the player forward recipe, having the player advance in a linear fashion is important for keeping the map flow. But if players are advancing too quickly, they will complete the levels too quickly and not be able to fully appreciate the map and atmosphere that you have created. To counter this, having locked doors can help spread out the time it takes to complete the level while still directing players forward. In this recipe, we will be now looking at how to utilize locked doors.
How to do it…
To start, we will insert the Locked Door
model from the Chapter 7
model pack and then ungroup it. We will then put the door in place and build walls around the hallway and rooms. Inside one of the rooms, we will build a shelf to place the key on, and then add a ceiling over the rooms and hallway. We will then finish by using a SurfaceGui object to create text above the doors. To begin, follow these steps:
- Insert the Locked...