-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
310 additions
and
101 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
:look | ||
say player "That must be the command to open the door." | ||
say player "That's the button to open the door." | ||
|
||
:use | ||
> [!r8_m_door_open] | ||
#superpose_scene "res://game/rooms/room08/puzzle/10_buttons_puzzle.tscn" | ||
# Load the puzzle | ||
spawn puzzle "res://game/rooms/room08/puzzle/10_buttons_puzzle.tscn" | ||
|
||
> [r8_m_door_open] | ||
say player "The door is already open." | ||
|
||
# Currently the button gets disabled when you beat the puzzle, so there's | ||
# no button you can interract with. If you set it up so the button was | ||
# still enabled, this code would provide feedback to the user if they | ||
# attempted to "use" the already unlocked puzzle. | ||
#> [r8_m_door_open] | ||
# say player "The door is already open." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
:look | ||
say player "That must be the command to open the door." | ||
say player "That's the button to relock the door." | ||
|
||
:use | ||
set_global r8_m_door_open false | ||
set_state r8_m_door door_close | ||
> [r8_m_door_open] | ||
# If the door is unlocked, reset the puzzle. | ||
# Set the door open to false so the room gets set up | ||
# correctly if you exit and reenter | ||
set_global r8_m_door_open false | ||
# Play the door closing animation to "relock" the door | ||
set_state r8_m_door door_close | ||
# Reactivate the puzzle button so the player can redo | ||
# the puzzle and unlock the door again | ||
set_active r8_mini_puzzle_button true | ||
stop | ||
> [!r8_m_door_open] | ||
# Don't reset the puzzle if the door is currently locked | ||
say player "The puzzle doesn't need to be reset" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,14 @@ | ||
:look | ||
say player "That's the door to room 9" | ||
|
||
:exit_scene | ||
change_scene "res://game/rooms/room09/room09.tscn" | ||
> [r8_m_door_open] | ||
# Only let the player into the next room if they've passed the puzzle | ||
change_scene "res://game/rooms/room09/room09.tscn" | ||
|
||
> [!r8_m_door_open] | ||
# The door is always an exit, but trying to go through it won't change | ||
# scenes if you haven't unlocked the puzzle. | ||
say player "The door is locked" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.