To keep from having to solve the Escape Room every time you want to test something, modify these two exports functions.
/js secretPassage() will just open the Secret Passage now, so that you can easily get in and out.
/js testInventory() will just give you the key, so that you can always get out of the library.
world.dropItem() is a super easy way to get your custom item if you don't want to make a crafting recipe!
Save, deploy, reload and move around inside the library. You should be teleported to the entrance, looking up at the portrait.
If an instructor is available to connect to your server, they should be teleported into the library as well.
Borrowing some skills we learned in the Custom Particle Trails lesson, make a small smoke trail follow anyone while they are in the library.
Because we have four different blocks for the doors, we need to use a loop to check them all inside of our
playerInteract event function. If the player is holding the key to the library, they will be able to open the door, and escape the escape room.
Otherwise, the door should slam closed (because the event that should have opened it gets canceled) and make a thudding noise.
Congratulations, you have made the entire Haunted Library Escape Room! If you can, grab some friends and have them try to solve the puzzle! Or celebrate by blowing it to smithereens with a Nuclear Bow. We can always use the drone to build it back again.
The final lesson of this course is a completely new challenge that will test what you learned in the previous lessons. We will break it down into individual challenges, worth a grand total of 1000 points!