Renamed all room folders to use 2 digits.
This commit is contained in:
36
game/rooms/room02/background.tscn
Normal file
36
game/rooms/room02/background.tscn
Normal file
@@ -0,0 +1,36 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_background.gd" type="Script" id=1]
|
||||
[ext_resource path="res://game/rooms/room02/bridge.tscn" type="PackedScene" id=2]
|
||||
|
||||
[node name="background" type="TextureRect"]
|
||||
margin_right = 1298.0
|
||||
margin_bottom = 559.0
|
||||
mouse_filter = 2
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="l_platform" type="Line2D" parent="."]
|
||||
position = Vector2( 0, -266 )
|
||||
points = PoolVector2Array( -2.96298, 712.01, 129.973, 614.429, 499.081, 611.601, 456.654, 806.761, -4.3772, 811.004, -2.96295, 713.424 )
|
||||
|
||||
[node name="l_door" type="Line2D" parent="."]
|
||||
position = Vector2( 0, -266 )
|
||||
points = PoolVector2Array( -2.96298, 712.01, 1.85498, 387.294, 87.755, 339.775, 87.5463, 649.784 )
|
||||
|
||||
[node name="r_platform" type="Line2D" parent="."]
|
||||
position = Vector2( 0, -266 )
|
||||
points = PoolVector2Array( 859.704, 802.519, 815.717, 612.674, 1172.24, 617.258, 1288.21, 675.24, 1293.86, 815.247, 861.118, 808.176 )
|
||||
|
||||
[node name="r_door" type="Line2D" parent="."]
|
||||
position = Vector2( 0, -267.828 )
|
||||
points = PoolVector2Array( 1175.07, 620.086, 1171.24, 311.267, 1274.8, 356.87, 1278.31, 672.412, 1184.97, 628.571 )
|
||||
|
||||
[node name="bridge" parent="." instance=ExtResource( 2 )]
|
||||
interact_positions = {
|
||||
"default": Vector2( 0, 0 )
|
||||
}
|
||||
|
||||
[editable path="bridge"]
|
||||
54
game/rooms/room02/bridge.tscn
Normal file
54
game/rooms/room02/bridge.tscn
Normal file
@@ -0,0 +1,54 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_item.gd" type="Script" id=1]
|
||||
|
||||
[sub_resource type="Animation" id=1]
|
||||
resource_name = "bridge_close"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath(".:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 1 ),
|
||||
"transitions": PoolRealArray( 1, 1 ),
|
||||
"update": 0,
|
||||
"values": [ Vector2( 0, 0 ), Vector2( 1.41716, -160.142 ) ]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id=2]
|
||||
resource_name = "bridge_open"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath(".:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 1 ),
|
||||
"transitions": PoolRealArray( 1, 1 ),
|
||||
"update": 0,
|
||||
"values": [ Vector2( 1.417, -160.142 ), Vector2( 0, 0 ) ]
|
||||
}
|
||||
|
||||
[node name="bridge" type="Area2D"]
|
||||
script = ExtResource( 1 )
|
||||
global_id = "r2_bridge"
|
||||
is_interactive = false
|
||||
player_orients_on_arrival = false
|
||||
dialog_color = Color( 1, 1, 1, 1 )
|
||||
interact_positions = {
|
||||
"default": Vector2( 0, 0 )
|
||||
}
|
||||
|
||||
[node name="bridge_lines" type="Line2D" parent="."]
|
||||
position = Vector2( -2.36194, -105.8 )
|
||||
points = PoolVector2Array( 496.624, 640.806, 823.362, 644.635, 856.546, 776.097, 468.544, 773.544, 493.688, 640.283 )
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
anims/bridge_close = SubResource( 1 )
|
||||
anims/bridge_open = SubResource( 2 )
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
|
||||
polygon = PoolVector2Array( 493.501, 532.894, 463.501, 670.894, 861.501, 670.894, 823.501, 530.894 )
|
||||
25
game/rooms/room02/button/button.tscn
Normal file
25
game/rooms/room02/button/button.tscn
Normal file
@@ -0,0 +1,25 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_item.gd" type="Script" id=1]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 28.6442, 29.8513 )
|
||||
|
||||
[node name="button_right" type="Area2D"]
|
||||
script = ExtResource( 1 )
|
||||
tooltip_name = "Button"
|
||||
default_action = "use"
|
||||
dialog_color = Color( 1, 1, 1, 1 )
|
||||
interact_positions = {
|
||||
"default": Vector2( 971.212, 150.721 )
|
||||
}
|
||||
|
||||
[node name="Line2D" type="Line2D" parent="."]
|
||||
points = PoolVector2Array( 2.86993, 4.8189, 2.86993, 53.646, 50.8979, 53.9476, 50.5746, 3.69644, -1.72314, 4.51215 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2( 26.9811, 29.4218 )
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="dialog_position" type="Position2D" parent="."]
|
||||
position = Vector2( 22.0044, -141.187 )
|
||||
50
game/rooms/room02/esc/button.esc
Executable file
50
game/rooms/room02/esc/button.esc
Executable file
@@ -0,0 +1,50 @@
|
||||
:look
|
||||
> [! r2_look_dialog_advance]
|
||||
say player "That button must activate the bridge."
|
||||
set_global r2_look_dialog_advance 1
|
||||
stop
|
||||
> [eq r2_look_dialog_advance 1]
|
||||
say player "I already said that this button must activate the bridge."
|
||||
set_global r2_look_dialog_advance 2
|
||||
stop
|
||||
> [eq r2_look_dialog_advance 2]
|
||||
set_angle player 180
|
||||
say player "Listen closely."
|
||||
say player "This"
|
||||
say player "button"
|
||||
say player "must"
|
||||
say player "activate"
|
||||
say player "the bridge."
|
||||
set_global r2_look_dialog_advance 3
|
||||
stop
|
||||
> [eq r2_look_dialog_advance 3]
|
||||
say player "I give up."
|
||||
say player "<sob>"
|
||||
stop
|
||||
|
||||
|
||||
:push
|
||||
say player "I must USE this."
|
||||
say r2_button "Bzzt, indeed."
|
||||
say player "AH! A talking button."
|
||||
say r2_button "I am not a button, I am a mighty AI."
|
||||
say player "What?"
|
||||
say r2_button "I am intelligent, like you."
|
||||
say r2_button "Or, like you think you are, apparently..."
|
||||
say player "Hey!"
|
||||
|
||||
:use
|
||||
> [r2_bridge_closed]
|
||||
set_state r2_bridge bridge_open
|
||||
enable_terrain bridge_open
|
||||
set_global r2_bridge_closed false
|
||||
#set_interactive r2_right_platform true
|
||||
set_interactive r2_bridge false
|
||||
stop
|
||||
> [!r2_bridge_closed]
|
||||
set_state r2_bridge bridge_close
|
||||
enable_terrain bridge_closed
|
||||
set_global r2_bridge_closed true
|
||||
set_interactive r2_right_platform false
|
||||
set_interactive r2_bridge false
|
||||
stop
|
||||
3
game/rooms/room02/esc/left_exit.esc
Executable file
3
game/rooms/room02/esc/left_exit.esc
Executable file
@@ -0,0 +1,3 @@
|
||||
:exit_scene
|
||||
set_sound_state bg_sound res://game/sfx/sounds/doorOpen_2.ogg false
|
||||
change_scene "res://game/rooms/room01/room01.tscn"
|
||||
3
game/rooms/room02/esc/right_exit.esc
Executable file
3
game/rooms/room02/esc/right_exit.esc
Executable file
@@ -0,0 +1,3 @@
|
||||
:exit_scene
|
||||
set_sound_state bg_sound res://game/sfx/sounds/doorOpen_2.ogg false
|
||||
change_scene "res://game/rooms/room03/room03.tscn"
|
||||
3
game/rooms/room02/esc/right_platform.esc
Executable file
3
game/rooms/room02/esc/right_platform.esc
Executable file
@@ -0,0 +1,3 @@
|
||||
:look
|
||||
say player "That's the other side."
|
||||
|
||||
44
game/rooms/room02/esc/room02_bridge.esc
Executable file
44
game/rooms/room02/esc/room02_bridge.esc
Executable file
@@ -0,0 +1,44 @@
|
||||
# THIS ROOMS FEATURES AN OPEN BRIDGE WITH A BUTTON TO USE IN ORDER TO OPEN
|
||||
|
||||
|
||||
:setup
|
||||
|
||||
> [r2_bridge_closed]
|
||||
# Make set_state IMMEDIATE to reach the final frame immediately
|
||||
set_state r2_bridge bridge_close true
|
||||
enable_terrain bridge_closed
|
||||
set_interactive r2_right_platform false
|
||||
|
||||
> [eq ESC_LAST_SCENE room1]
|
||||
teleport player r2_l_exit
|
||||
# Set player look left
|
||||
set_angle player 180
|
||||
stop
|
||||
> [eq ESC_LAST_SCENE room3]
|
||||
teleport player r2_r_exit
|
||||
# Set player look left
|
||||
set_angle player 270
|
||||
|
||||
# Activate bridge, else player is stuck
|
||||
#set_state r2_bridge bridge_close
|
||||
#enable_terrain bridge_closed
|
||||
#set_global r2_bridge_closed true
|
||||
set_interactive r2_right_platform false
|
||||
#set_interactive r2_bridge false
|
||||
|
||||
stop
|
||||
> [!last_scene]
|
||||
teleport player player_start
|
||||
stop
|
||||
|
||||
#teleport player player_start
|
||||
|
||||
|
||||
|
||||
# DEBUG
|
||||
#set_state r2_bridge bridge_close
|
||||
#enable_terrain bridge_closed
|
||||
#set_global bridge_closed true
|
||||
#set_interactive r2_right_platform false
|
||||
## /DEBUG
|
||||
|
||||
104
game/rooms/room02/room02.tscn
Normal file
104
game/rooms/room02/room02.tscn
Normal file
@@ -0,0 +1,104 @@
|
||||
[gd_scene load_steps=8 format=2]
|
||||
|
||||
[ext_resource path="res://game/rooms/room02/walkable_area.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://game/rooms/room02/background.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://game/ui/commons/fonts/caslonantique.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://game/characters/mark/mark.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://game/rooms/room02/button/button.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_room.gd" type="Script" id=6]
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_item.gd" type="Script" id=7]
|
||||
|
||||
[node name="room2" type="Node2D"]
|
||||
script = ExtResource( 6 )
|
||||
global_id = "room2"
|
||||
esc_script = "res://game/rooms/room02/esc/room02_bridge.esc"
|
||||
player_scene = ExtResource( 4 )
|
||||
camera_limits = [ Rect2( 0, 0, 1289, 555 ) ]
|
||||
|
||||
[node name="walkable_area" parent="." instance=ExtResource( 1 )]
|
||||
debug_mode = 1
|
||||
|
||||
[node name="background" parent="." instance=ExtResource( 2 )]
|
||||
|
||||
[node name="room_label" type="Label" parent="background"]
|
||||
margin_right = 40.0
|
||||
margin_bottom = 14.0
|
||||
custom_fonts/font = ExtResource( 3 )
|
||||
text = "ROOM 2"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Hotspots" type="Node2D" parent="."]
|
||||
|
||||
[node name="r_platform" type="Area2D" parent="Hotspots"]
|
||||
script = ExtResource( 7 )
|
||||
global_id = "r2_right_platform"
|
||||
esc_script = "res://game/rooms/room02/esc/right_platform.esc"
|
||||
interaction_direction = 3
|
||||
tooltip_name = "Right platform"
|
||||
default_action = "look"
|
||||
dialog_color = Color( 1, 1, 1, 1 )
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Hotspots/r_platform"]
|
||||
polygon = PoolVector2Array( 870.974, 538.342, 827.536, 353.995, 1181.4, 357.174, 1287.34, 413.325, 1289.46, 545.758 )
|
||||
|
||||
[node name="action_pos" type="Position2D" parent="Hotspots/r_platform"]
|
||||
position = Vector2( 430.893, 451.052 )
|
||||
|
||||
[node name="r_door" type="Area2D" parent="Hotspots"]
|
||||
script = ExtResource( 7 )
|
||||
global_id = "r2_r_exit"
|
||||
esc_script = "res://game/rooms/room02/esc/right_exit.esc"
|
||||
is_exit = true
|
||||
tooltip_name = "Right exit"
|
||||
default_action = "walk"
|
||||
dialog_color = Color( 1, 1, 1, 1 )
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Hotspots/r_door"]
|
||||
polygon = PoolVector2Array( 1177.94, 348.61, 1175.95, 45.3759, 1276.06, 92.0953, 1277.95, 399.407 )
|
||||
|
||||
[node name="Position2D" type="Position2D" parent="Hotspots/r_door"]
|
||||
position = Vector2( 1225.47, 353.99 )
|
||||
|
||||
[node name="l_door" type="Area2D" parent="Hotspots"]
|
||||
script = ExtResource( 7 )
|
||||
global_id = "r2_l_exit"
|
||||
esc_script = "res://game/rooms/room02/esc/left_exit.esc"
|
||||
is_exit = true
|
||||
tooltip_name = "Left exit"
|
||||
default_action = "walk"
|
||||
dialog_color = Color( 1, 1, 1, 1 )
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Hotspots/l_door"]
|
||||
polygon = PoolVector2Array( -1.37926, 443.158, 7.96461, 122.796, 84.0504, 77.4118, 88.055, 377.751 )
|
||||
|
||||
[node name="Position2D" type="Position2D" parent="Hotspots/l_door"]
|
||||
position = Vector2( 52.1462, 384.691 )
|
||||
|
||||
[node name="button_right" parent="Hotspots" instance=ExtResource( 5 )]
|
||||
position = Vector2( 958.107, 176.401 )
|
||||
global_id = "r2_button_right"
|
||||
esc_script = "res://game/rooms/room02/esc/button.esc"
|
||||
dialog_color = Color( 0, 1, 0.109804, 1 )
|
||||
|
||||
[node name="Position2D" type="Position2D" parent="Hotspots/button_right"]
|
||||
position = Vector2( 29.4302, 195.411 )
|
||||
__meta__ = {
|
||||
"_editor_description_": ""
|
||||
}
|
||||
|
||||
[node name="button_left" parent="Hotspots" instance=ExtResource( 5 )]
|
||||
position = Vector2( 288.82, 171.439 )
|
||||
global_id = "r2_button"
|
||||
esc_script = "res://game/rooms/room02/esc/button.esc"
|
||||
dialog_color = Color( 0, 1, 0.109804, 1 )
|
||||
|
||||
[node name="Position2D" type="Position2D" parent="Hotspots/button_left"]
|
||||
position = Vector2( 24.6681, 196.998 )
|
||||
__meta__ = {
|
||||
"_editor_description_": ""
|
||||
}
|
||||
|
||||
[node name="player_start" type="Position2D" parent="."]
|
||||
position = Vector2( 76.7617, 437.649 )
|
||||
26
game/rooms/room02/walkable_area.tscn
Normal file
26
game/rooms/room02/walkable_area.tscn
Normal file
@@ -0,0 +1,26 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_terrain.gd" type="Script" id=1]
|
||||
|
||||
[sub_resource type="NavigationPolygon" id=1]
|
||||
vertices = PoolVector2Array( 129.634, 615.792, 488.56, 617.98, 454.637, 800.726, 2.69714, 805.103, 75.8943, 663.384, 3.79144, 707.712, 5.9538, 653.476, 63.1848, 626.267, 1284.99, 804.433, 868.119, 803.394, 828.615, 621.468, 1152.31, 619.946, 1181.97, 640.075, 1260.04, 615.231, 1282.91, 680.724, 1190.39, 590.281 )
|
||||
polygons = [ PoolIntArray( 0, 1, 2, 3, 4 ), PoolIntArray( 4, 3, 5, 6, 7 ), PoolIntArray( 8, 9, 10, 11, 12 ), PoolIntArray( 13, 14, 8, 12, 15 ) ]
|
||||
outlines = [ PoolVector2Array( 3.79144, 707.712, 5.9538, 653.476, 63.1848, 626.267, 75.8943, 663.384, 129.634, 615.792, 488.56, 617.98, 454.637, 800.726, 2.69714, 805.103 ), PoolVector2Array( 828.615, 621.468, 868.119, 803.394, 1284.99, 804.433, 1282.91, 680.724, 1260.04, 615.231, 1190.39, 590.281, 1181.97, 640.075, 1152.31, 619.946 ) ]
|
||||
|
||||
[sub_resource type="NavigationPolygon" id=2]
|
||||
vertices = PoolVector2Array( 837.638, 649.714, 832.166, 621.263, 1171.4, 624.546, 863.901, 768.992, 129.634, 615.792, 488.56, 617.98, 484.183, 645.337, 462.297, 766.803, 454.637, 800.726, 85.8629, 647.526, 1265.5, 615.792, 1281.92, 680.354, 1290.67, 816.046, 877.032, 800.726, 2.69714, 805.103, 3.79144, 707.712, 13.64, 663.94, 55.2229, 643.149, 1199.85, 607.037 )
|
||||
polygons = [ PoolIntArray( 0, 1, 2, 3 ), PoolIntArray( 4, 5, 6, 7, 8, 9 ), PoolIntArray( 10, 11, 12, 13, 3, 2 ), PoolIntArray( 8, 14, 15, 16, 17, 9 ), PoolIntArray( 3, 7, 6, 0 ), PoolIntArray( 10, 2, 18 ) ]
|
||||
outlines = [ PoolVector2Array( 3.79144, 707.712, 13.64, 663.94, 55.2229, 643.149, 85.8629, 647.526, 129.634, 615.792, 488.56, 617.98, 484.183, 645.337, 837.638, 649.714, 832.166, 621.263, 1171.4, 624.546, 1199.85, 607.037, 1265.5, 615.792, 1281.92, 680.354, 1290.67, 816.046, 877.032, 800.726, 863.901, 768.992, 462.297, 766.803, 454.637, 800.726, 2.69714, 805.103 ) ]
|
||||
|
||||
[node name="walkable_area" type="Navigation2D"]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="bridge_open" type="NavigationPolygonInstance" parent="."]
|
||||
position = Vector2( 6.73163, -264.779 )
|
||||
navpoly = SubResource( 1 )
|
||||
|
||||
[node name="bridge_closed" type="NavigationPolygonInstance" parent="."]
|
||||
visible = false
|
||||
position = Vector2( 0, -269.266 )
|
||||
navpoly = SubResource( 2 )
|
||||
enabled = false
|
||||
Reference in New Issue
Block a user