Files
gymkhana-actions/game/rooms/room03/esc/button.esc
balloonpopper 09ab75a913 feat: Updated room 2 and 3 graphics (#492)
Co-authored-by: Balloonpopper <balloonpopper@git.com>
2022-02-15 18:21:42 +01:00

57 lines
1.5 KiB
Plaintext
Executable File

:ready
set_state r3_button button_broken
:look
say player "That button must activate the bridge, but it is broken." [button_broken]
say player "It should work now." [!button_broken]
:push
say player "I must USE this."
:use
> [!button_broken, !r3_bridge_closed]
set_state r3_bridge bridge_close
enable_terrain bridge_closed
set_global r3_bridge_closed true
set_interactive r3_right_platform false
set_interactive r3_r_exit true
# We start with the collision polygon on the right door disabled
# This lets it act as part of the right platform, which responds
# with "I can't reach it" when the player clicks it with the bridge
# open.
# We use a custom function to enable the collision polygon on the door
# to enable it to work as a door once the bridge is closed.
custom r3_r_exit door_enabler enable_door
stop
> [!button_broken, r3_bridge_closed]
set_state r3_bridge bridge_open
enable_terrain bridge_open
set_global r3_bridge_closed false
set_interactive r3_right_platform true
# Disable the door collision so it acts like part of the right
# platform again.
custom r3_r_exit door_enabler disable_door
stop
> [button_broken]
say player "The button is broken!"
stop
:talk
> [button_broken]
say player "Please, will you repair yourself?"
wait 1
set_state r3_button button_repaired
set_global button_broken false
wait 1
say player "Oh, it worked!"
stop
> [!button_broken]
say player "I better not talk to it any more, it might break again."
:arrived
say player "I am there!"