Skip to content

Commit

Permalink
fix: makes this button usable again
Browse files Browse the repository at this point in the history
  • Loading branch information
BHSDuncan authored and StraToN committed Nov 13, 2022
1 parent 9f2cfd0 commit 595bbed
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 22 deletions.
2 changes: 1 addition & 1 deletion game/rooms/room07/esc/button_push.esc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ say player "That button uses camera_push to point the camera at the object r7_lo
:use
# Disable input so all steps run without interruption
accept_input NONE
camera_push r7_lower_stairs 1 LINEAR
camera_push r7_lift_button_floor_2 1 LINEAR
wait 2
camera_set_target 1 player
# Re-enable user input
Expand Down
11 changes: 4 additions & 7 deletions game/rooms/room07/esc/button_set_pos.esc
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@ say player "That button uses camera_set_pos to point the camera at coordinates (
accept_input NONE
# Note that camera_set_pos puts the camera centre at a different location depending on
# the camera's limits
#camera_set_limits 1
camera_set_pos_block 2 2260 1050
#wait 2
#camera_set_limits 0
#camera_set_pos 0 1200 800
#wait 2
camera_set_target 1 player
camera_set_pos 1.9 1000 500
wait 2
camera_set_pos 0 1620 1150
camera_set_target_block 1 player
# Re-enable user input
accept_input ALL
5 changes: 3 additions & 2 deletions game/rooms/room07/esc/button_zoom.esc
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ say player "That button triggers a camera zoom effect."
# Disable input so all steps run without interruption
accept_input NONE
camera_set_zoom 1.3 1
wait 2
wait 1.2
camera_set_zoom 0.5 1
wait 2
wait 1.2
camera_set_zoom 1 1
wait 1.2
camera_set_target 0 player
# Re-enable user input
accept_input ALL
1 change: 0 additions & 1 deletion game/rooms/room07/esc/lift_door_floor_1.esc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
# Move the player a long way as there isn't currently a "hide player" command
teleport_pos player 5000 5000
set_angle player 180
camera_set_limits 2
camera_push r7_lift_door_floor_2 3
anim_block r7_lift lift_floor_1_to_2_with_player
teleport player r7_lift_door_floor_2
Expand Down
1 change: 0 additions & 1 deletion game/rooms/room07/esc/lift_door_floor_2.esc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
# Move the player a long way as there isn't currently a "hide player" command
teleport_pos player 5000 5000
set_angle player 180
camera_set_limits 2
camera_push r7_lift_door_floor_1 3
anim_block r7_lift lift_floor_2_to_1_with_player
teleport player r7_lift_door_floor_1
Expand Down
2 changes: 0 additions & 2 deletions game/rooms/room07/esc/lower_stairs.esc
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ say player "movin up"

teleport player r7_upper_stairs
set_angle player 270
camera_set_limits 2
camera_set_target 0 player
wait 1
camera_set_limits 1
enable_terrain upper_platform
# Reenable player interaction
accept_input ALL
7 changes: 6 additions & 1 deletion game/rooms/room07/esc/room07.esc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ set_state r7_alarm_cone_floor_1 camera_not_triggered true
set_state r7_alarm_cone_floor_2 camera_not_triggered true
set_state r7_lift lift_floor_2_to_1_no_player true
camera_set_target 0 player
camera_set_limits 0

# camera_set_limits is how you change the active camera limits.
# If you change the below command to "camera_set_limits 0" you'll notice
# some of the camera commands start having issues as the camera no longer
# has access to the requested coordinates
camera_set_limits 1

> [eq ESC_LAST_SCENE room6]
teleport player r7_l_exit
Expand Down
2 changes: 0 additions & 2 deletions game/rooms/room07/esc/upper_stairs.esc
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ say player "movin down"

teleport player r7_lower_stairs
set_angle player 270
camera_set_limits 2
camera_set_target 0 player
wait 1
camera_set_limits 0
enable_terrain lower_platform
# Reenable player interaction
accept_input ALL
11 changes: 6 additions & 5 deletions game/rooms/room07/room07.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ __meta__ = {
global_id = "room7"
esc_script = "res://game/rooms/room07/esc/room07.esc"
player_scene = ExtResource( 4 )
camera_limits = [ Rect2( 0, 600, 2260, 1000 ), Rect2( 0, 0, 2260, 1000 ), Rect2( 0, 0, 2260, 2000 ) ]
camera_limits = [ Rect2( 0, 0, 1300, 2000 ), Rect2( 0, 0, 2260, 2000 ) ]
editor_debug_mode = 1

[node name="lift_shaft" type="Polygon2D" parent="."]
Expand Down Expand Up @@ -883,7 +883,7 @@ script = ExtResource( 8 )

[node name="upper_stairs" type="Area2D" parent="Hotspots"]
pause_mode = 1
position = Vector2( 1347.64, 473.026 )
position = Vector2( 1908, 390 )
script = ExtResource( 7 )
global_id = "r7_upper_stairs"
esc_script = "res://game/rooms/room07/esc/upper_stairs.esc"
Expand All @@ -895,11 +895,11 @@ dialog_color = Color( 1, 1, 1, 1 )
animations = null

[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Hotspots/upper_stairs"]
position = Vector2( -1334.92, 936.565 )
position = Vector2( -1896, 1022 )
polygon = PoolVector2Array( 1805.28, -1020.59, 1806.28, -1304.59, 1982.28, -1304.59, 1983.28, -1019.59 )

[node name="Position2D" type="Position2D" parent="Hotspots/upper_stairs"]
position = Vector2( 558.36, -82.026 )
position = Vector2( -5.00012, -2 )
script = ExtResource( 8 )

[node name="button_camera_push" type="Area2D" parent="Hotspots"]
Expand Down Expand Up @@ -1127,13 +1127,14 @@ tooltip_name = "Lift Button"
default_action = "use"
combine_when_selected_action_is_in = [ ]
dialog_color = Color( 1, 1, 1, 1 )
camera_node = NodePath("ESCLocation")
animations = null

[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="lift_button_floor_2"]
polygon = PoolVector2Array( 1311, 245, 1347, 245, 1347, 283, 1311, 283 )

[node name="ESCLocation" type="Position2D" parent="lift_button_floor_2"]
position = Vector2( 1331, 420 )
position = Vector2( 1331, 450 )
script = ExtResource( 8 )

[node name="lift_door_floor_1" type="Area2D" parent="."]
Expand Down

0 comments on commit 595bbed

Please sign in to comment.