Event: "Search" { display("You found an entrance to a hidden tunnel!") room.setPath("south",hiddenTunnel,true) // Sets a connected path between hiddenTunnel and room when player searches room
room.disableEvent("Search") // Disables the event because the room has been searched } }
Room: hiddenTunnel{
Event: "Pull lever" { display("A trapdoor opens in the floor!") hiddenTunnel.setPath("down",hole) // Sets a one-way path from hiddenTunnel to hole
hiddenTunnel.disableEvent("Pull lever") // Disables the event because the lever has been pulled } }
Room: hole
Description
Declares a room object the player can travel to in a specific direction from this room.
The boolean determines whether the rooms are connected through the path, and is false by default. That is, the player can travel from this room to the room in the set direction, but not back.
To get a connected path between the rooms, the boolean should be set to true.