Feat: New graphics for room 8
This commit is contained in:
committed by
Julian Murgia
parent
7e6fb7b047
commit
7a64c7707f
@@ -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."
|
||||
|
||||
@@ -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"
|
||||
@@ -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"
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,22 @@
|
||||
:setup
|
||||
|
||||
# This code will run only the first time you enter the room.
|
||||
> [!room8_visited]
|
||||
set_global room8_visited true
|
||||
set_global r8_m_door_open false
|
||||
# Activate locked puzzle button the first time you enter the room only.
|
||||
# It will keep it's locked/unlocked state on future room entrances.
|
||||
# It should already be active, this is a safety precaution.
|
||||
set_active r8_mini_puzzle_button true
|
||||
|
||||
> [r8_m_door_open]
|
||||
# If the door was previously opened, quickly play the open animation
|
||||
# so you don't see a closed door when the room appears.
|
||||
set_state r8_m_door door_open true
|
||||
# Hide locked puzzle icon and make the button non-interactive as
|
||||
# the puzzle was previously unlocked
|
||||
set_active r8_mini_puzzle_button false
|
||||
|
||||
|
||||
> [eq ESC_LAST_SCENE room7]
|
||||
teleport player r8_l_exit
|
||||
|
||||
Reference in New Issue
Block a user