feat: Updated room 9 graphics
This commit is contained in:
committed by
Julian Murgia
parent
ab795f2fd9
commit
7e3688fa63
@@ -1,8 +1,25 @@
|
||||
# :SETUP is called EVERY TIME the room is loaded
|
||||
# :READY is called only the FIRST TIME the room is loaded
|
||||
# :SETUP is called EVERY TIME the room is loaded BEFORE ready
|
||||
# :READY is called EVERY TIME the room is loaded AFTER setup
|
||||
|
||||
:use
|
||||
# Set the counter of open closets to 0. Used for the magic bottle appearance.
|
||||
set_global open_closets 0
|
||||
set_state r9_closet_left closed
|
||||
set_state r9_closet_middle closed
|
||||
set_state r9_closet_right closed
|
||||
# Clear the variable holding which closet contains the bottle
|
||||
# (Used for if the player exits then reenters the room)
|
||||
set_global r9_bottle_closet 0
|
||||
|
||||
# If the bottle is active in any cupboard, disable it
|
||||
set_active r9_bottle_left false
|
||||
set_active r9_bottle_middle false
|
||||
set_active r9_bottle_right false
|
||||
|
||||
# Animate all the doors closing
|
||||
set_state r9_closet_left close_door
|
||||
set_state r9_closet_middle close_door
|
||||
set_state r9_closet_right close_door
|
||||
|
||||
# Mark all the doors closed. Used to work out if we ignore the close command
|
||||
# on a closed closet, or the open command on an opened closet.
|
||||
set_global left_closet_open false
|
||||
set_global middle_closet_open false
|
||||
set_global right_closet_open false
|
||||
|
||||
@@ -1,34 +1,79 @@
|
||||
# Magical closet: the object is always in the LAST opened closet
|
||||
|
||||
# We want "use" and "open" to give the same end result
|
||||
# so we duplicate everything for use and open
|
||||
:use
|
||||
> [left_closet_open]
|
||||
# The closet is already open, so exit the command
|
||||
stop
|
||||
|
||||
set_global left_closet_open true
|
||||
# Increment the counter of the number of open closets
|
||||
inc_global open_closets 1
|
||||
|
||||
> [lt open_closets 3]
|
||||
set_state r9_closet_left open
|
||||
stop
|
||||
# Animate the door opening
|
||||
set_state r9_closet_left open_door
|
||||
|
||||
> [eq open_closets 3]
|
||||
set_state r9_closet_left open
|
||||
# After opening this one, we have 3 closets open
|
||||
# Activate the magic bottle in this particular closet
|
||||
> [i/r9_bottle]
|
||||
# If they've already picked up the bottle, don't make it appear
|
||||
stop
|
||||
> [r9_puzzle_complete]
|
||||
# If they've already completed the puzzle, don't make it appear
|
||||
stop
|
||||
set_active r9_bottle_left true
|
||||
# Note which cupboard the bottle is in in case the player
|
||||
# exits then reenters the room
|
||||
set_global r9_bottle_closet 1
|
||||
stop
|
||||
|
||||
|
||||
|
||||
:open
|
||||
> [left_closet_open]
|
||||
# The closet is already open, so exit the command
|
||||
stop
|
||||
|
||||
set_global left_closet_open true
|
||||
# Increment the counter of the number of open closets
|
||||
inc_global open_closets 1
|
||||
|
||||
> [lt open_closets 3]
|
||||
set_state r9_closet_left open
|
||||
stop
|
||||
# Animate the door opening
|
||||
set_state r9_closet_left open_door
|
||||
|
||||
> [eq open_closets 3]
|
||||
set_state r9_closet_left open
|
||||
# After opening this one, we have 3 closets open
|
||||
# Activate the magic bottle in this particular closet
|
||||
> [i/r9_bottle]
|
||||
# If they've already picked up the bottle, don't make it appear
|
||||
stop
|
||||
> [r9_puzzle_complete]
|
||||
# If they've already completed the puzzle, don't make it appear
|
||||
stop
|
||||
set_active r9_bottle_left true
|
||||
# Note which cupboard the bottle is in in case the player
|
||||
# exits then reenters the room
|
||||
set_global r9_bottle_closet 1
|
||||
stop
|
||||
|
||||
:close
|
||||
> [!left_closet_open]
|
||||
# If the closet isn't open, ignore the close command
|
||||
stop
|
||||
|
||||
> [eq open_closets 3]
|
||||
# If there's 3 closets open, the bottle was made active
|
||||
# We don't know which closet it was activated in so lets
|
||||
# deactivate all of them
|
||||
set_active r9_bottle_left false
|
||||
set_active r9_bottle_middle false
|
||||
set_active r9_bottle_right false
|
||||
|
||||
# Animate the door closing
|
||||
set_state r9_closet_left close_door
|
||||
|
||||
set_global left_closet_open false
|
||||
# Decrement the counter of closets open (used to determine when to show
|
||||
# the magic bottle)
|
||||
dec_global open_closets 1
|
||||
@@ -1,34 +1,79 @@
|
||||
# Magical closet: the object is always in the LAST opened closet
|
||||
|
||||
# We want "use" and "open" to give the same end result
|
||||
# so we duplicate everything for use and open
|
||||
:use
|
||||
> [middle_closet_open]
|
||||
# The closet is already open, so exit the command
|
||||
stop
|
||||
|
||||
set_global middle_closet_open true
|
||||
# Increment the counter of the number of open closets
|
||||
inc_global open_closets 1
|
||||
|
||||
> [lt open_closets 3]
|
||||
set_state r9_closet_middle open
|
||||
stop
|
||||
# Animate the door opening
|
||||
set_state r9_closet_middle open_door
|
||||
|
||||
> [eq open_closets 3]
|
||||
set_state r9_closet_middle open
|
||||
# After opening this one, we have 3 closets open
|
||||
# Activate the magic bottle in this particular closet
|
||||
> [i/r9_bottle]
|
||||
# If they've already picked up the bottle, don't make it appear
|
||||
stop
|
||||
> [r9_puzzle_complete]
|
||||
# If they've already completed the puzzle, don't make it appear
|
||||
stop
|
||||
set_active r9_bottle_middle true
|
||||
# Note which cupboard the bottle is in in case the player
|
||||
# exits then reenters the room
|
||||
set_global r9_bottle_closet 2
|
||||
stop
|
||||
|
||||
|
||||
:open
|
||||
> [middle_closet_open]
|
||||
# The closet is already open, so exit the command
|
||||
stop
|
||||
|
||||
set_global middle_closet_open true
|
||||
# Increment the counter of the number of open closets
|
||||
inc_global open_closets 1
|
||||
|
||||
> [lt open_closets 3]
|
||||
set_state r9_closet_middle open
|
||||
stop
|
||||
# Animate the door opening
|
||||
set_state r9_closet_middle open_door
|
||||
|
||||
> [eq open_closets 3]
|
||||
set_state r9_closet_middle open
|
||||
# After opening this one, we have 3 closets open
|
||||
# Activate the magic bottle in this particular closet
|
||||
> [i/r9_bottle]
|
||||
# If they've already picked up the bottle, don't make it appear
|
||||
stop
|
||||
> [r9_puzzle_complete]
|
||||
# If they've already completed the puzzle, don't make it appear
|
||||
stop
|
||||
set_active r9_bottle_middle true
|
||||
# Note which cupboard the bottle is in in case the player
|
||||
# exits then reenters the room
|
||||
set_global r9_bottle_closet 2
|
||||
stop
|
||||
|
||||
:close
|
||||
> [!middle_closet_open]
|
||||
# If the closet isn't open, ignore the close command
|
||||
stop
|
||||
|
||||
> [eq open_closets 3]
|
||||
# If there's 3 closets open, the bottle was made active
|
||||
# We don't know which closet it was activated in so lets
|
||||
# deactivate all of them
|
||||
set_active r9_bottle_left false
|
||||
set_active r9_bottle_middle false
|
||||
set_active r9_bottle_right false
|
||||
|
||||
# Animate the door closing
|
||||
set_state r9_closet_middle close_door
|
||||
|
||||
set_global middle_closet_open false
|
||||
# Decrement the counter of closets open (used to determine when to show
|
||||
# the magic bottle)
|
||||
dec_global open_closets 1
|
||||
@@ -1,34 +1,79 @@
|
||||
# Magical closet: the object is always in the LAST opened closet
|
||||
|
||||
# We want "use" and "open" to give the same end result
|
||||
# so we duplicate everything for use and open
|
||||
:use
|
||||
> [right_closet_open]
|
||||
# The closet is already open, so exit the command
|
||||
stop
|
||||
|
||||
set_global right_closet_open true
|
||||
# Increment the counter of the number of open closets
|
||||
inc_global open_closets 1
|
||||
|
||||
> [lt open_closets 3]
|
||||
set_state r9_closet_right open
|
||||
stop
|
||||
|
||||
# Animate the door opening
|
||||
set_state r9_closet_right open_door
|
||||
|
||||
> [eq open_closets 3]
|
||||
set_state r9_closet_right open
|
||||
# After opening this one, we have 3 closets open
|
||||
# Activate the magic bottle in this particular closet
|
||||
> [i/r9_bottle]
|
||||
# If they've already picked up the bottle, don't make it appear
|
||||
stop
|
||||
> [r9_puzzle_complete]
|
||||
# If they've already completed the puzzle, don't make it appear
|
||||
stop
|
||||
set_active r9_bottle_right true
|
||||
# Note which cupboard the bottle is in in case the player
|
||||
# exits then reenters the room
|
||||
set_global r9_bottle_closet 3
|
||||
stop
|
||||
|
||||
|
||||
:open
|
||||
> [right_closet_open]
|
||||
# The closet is already open, so exit the command
|
||||
stop
|
||||
|
||||
set_global right_closet_open true
|
||||
# Increment the counter of the number of open closets
|
||||
inc_global open_closets 1
|
||||
|
||||
> [lt open_closets 3]
|
||||
set_state r9_closet_right open
|
||||
stop
|
||||
|
||||
# Animate the door opening
|
||||
set_state r9_closet_right open_door
|
||||
|
||||
> [eq open_closets 3]
|
||||
set_state r9_closet_right open
|
||||
# After opening this one, we have 3 closets open
|
||||
# Activate the magic bottle in this particular closet
|
||||
> [i/r9_bottle]
|
||||
# If they've already picked up the bottle, don't make it appear
|
||||
stop
|
||||
> [r9_puzzle_complete]
|
||||
# If they've already completed the puzzle, don't make it appear
|
||||
stop
|
||||
set_active r9_bottle_right true
|
||||
# Note which cupboard the bottle is in in case the player
|
||||
# exits then reenters the room
|
||||
set_global r9_bottle_closet 3
|
||||
stop
|
||||
|
||||
:close
|
||||
> [!right_closet_open]
|
||||
# If the closet isn't open, ignore the close command
|
||||
stop
|
||||
|
||||
> [eq open_closets 3]
|
||||
# If there's 3 closets open, the bottle was made active
|
||||
# We don't know which closet it was activated in so lets
|
||||
# deactivate all of them
|
||||
set_active r9_bottle_left false
|
||||
set_active r9_bottle_middle false
|
||||
set_active r9_bottle_right false
|
||||
|
||||
# Animate the door closing
|
||||
set_state r9_closet_right close_door
|
||||
|
||||
set_global right_closet_open false
|
||||
# Decrement the counter of closets open (used to determine when to show
|
||||
# the magic bottle)
|
||||
dec_global open_closets 1
|
||||
@@ -1,2 +1,7 @@
|
||||
:exit_scene
|
||||
change_scene "res://game/rooms/room10/room10.tscn"
|
||||
> [r9_puzzle_complete]
|
||||
change_scene "res://game/rooms/room10/room10.tscn"
|
||||
|
||||
> [!r9_puzzle_complete]
|
||||
say player "The door is locked"
|
||||
|
||||
|
||||
@@ -1,12 +1,63 @@
|
||||
|
||||
:setup
|
||||
|
||||
# In case the bottle is set to visible in the godot editor, either in a
|
||||
# cupboard or on the stand, hide it regardless.
|
||||
set_active r9_bottle_left false
|
||||
set_active r9_bottle_middle false
|
||||
set_active r9_bottle_right false
|
||||
set_state r9_stand remove_bottle
|
||||
|
||||
# Run all the animations to make sure the closet doors are closed
|
||||
set_state r9_closet_left close_door
|
||||
set_state r9_closet_middle close_door
|
||||
set_state r9_closet_right close_door
|
||||
|
||||
> [room09_visited]
|
||||
> [r9_puzzle_complete]
|
||||
# If the player has been here before and completed the puzzle
|
||||
set_state r9_stand set_bottle
|
||||
# Open the right doorway by using the open_door animation
|
||||
set_state r9_r_exit open_door true
|
||||
|
||||
# Open the closets as they were if the player exits then reenters
|
||||
> [left_closet_open]
|
||||
set_state r9_closet_left open_door
|
||||
> [middle_closet_open]
|
||||
set_state r9_closet_middle open_door
|
||||
> [right_closet_open]
|
||||
set_state r9_closet_right open_door
|
||||
|
||||
# If the player has left everything open but the bottle hasn't been
|
||||
# retrieved, show it where it used to be.
|
||||
> [!i/r9_bottle]
|
||||
# If the player isn't holding the bottle already, draw it if necessary
|
||||
> [eq r9_bottle_closet 1]
|
||||
set_active r9_bottle_left true
|
||||
> [eq r9_bottle_closet 2]
|
||||
set_active r9_bottle_middle true
|
||||
> [eq r9_bottle_closet 3]
|
||||
set_active r9_bottle_right true
|
||||
|
||||
|
||||
|
||||
> [!room09_visited]
|
||||
# Run initial set up steps. This will only happen once per game.
|
||||
set_global room09_visited true
|
||||
|
||||
# Set the count of open closets to 0. Used with the magic bottle.
|
||||
set_global open_closets 0
|
||||
#set_state r9_closet_left closed
|
||||
#set_state r9_closet_middle closed
|
||||
#set_state r9_closet_right closed
|
||||
|
||||
# Run all the animations to make sure the closet doors are closed
|
||||
set_state r9_closet_left close_door
|
||||
set_state r9_closet_middle close_door
|
||||
set_state r9_closet_right close_door
|
||||
|
||||
# Mark the puzzle uncomplete
|
||||
set_global r9_puzzle_complete false
|
||||
# Set up a variable to hold which cupboard contains the bottle
|
||||
# It will be used if the player exits then reenters the room
|
||||
set_global r9_bottle_closet 0
|
||||
|
||||
> [eq ESC_LAST_SCENE room8]
|
||||
teleport player r9_l_exit
|
||||
|
||||
@@ -1,6 +1,27 @@
|
||||
|
||||
:use r9_bottle
|
||||
# Make sure the full sequence completes. Let players speed through the text though.
|
||||
accept_input SKIP
|
||||
say player "This appears to be a magical bottle that unlocks doors."
|
||||
inventory_remove r9_bottle
|
||||
set_state r9_stand set_bottle
|
||||
set_state r9_r_exit r_door_open
|
||||
|
||||
# Place the bottle on the stand (i.e. unhide the placed bottle graphic)
|
||||
set_state r9_stand set_bottle
|
||||
|
||||
# Animate the door unlocking
|
||||
set_state r9_r_exit open_door
|
||||
|
||||
# Mark this room's puzzle as complete. This will stop it resetting and the
|
||||
# bottle from being displayed in a cupboard.
|
||||
set_global r9_puzzle_complete true
|
||||
set_global r9_bottle_closet 0
|
||||
accept_input ALL
|
||||
|
||||
:look
|
||||
> [r9_puzzle_complete]
|
||||
say player "Unlocking a door with a bottle, how strange."
|
||||
stop
|
||||
|
||||
> [!r9_puzzle_complete]
|
||||
say player "That stand looks like the perfect place"
|
||||
say player "to put a bottle."
|
||||
Reference in New Issue
Block a user