Event flags implementation (#382)

* Added event flags
* Added transition ESC command
* Also edited .gitignore to ignore .translation files
* docs: Automatic update of API docs

Co-authored-by: StraToN <StraToN@users.noreply.github.com>
This commit is contained in:
Julian Murgia
2021-09-07 09:13:09 +02:00
committed by GitHub
parent 903422960a
commit b4bf5b82d6
51 changed files with 1071 additions and 305 deletions

View File

@@ -3,7 +3,7 @@
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_inventory_item.gd" type="Script" id=1]
[ext_resource path="res://game/items/textures/genericItem_color_127.png" type="Texture" id=2]
[node name="empty_sheet" type="TextureButton"]
[node name="bottle" type="TextureButton"]
margin_right = 50.0
margin_bottom = 140.0
texture_normal = ExtResource( 2 )
@@ -11,4 +11,3 @@ script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
global_id = "r9_bottle"

View 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]
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" id=2]
[node name="r_door" type="Area2D"]
pause_mode = 1
script = ExtResource( 1 )
__meta__ = {
"_editor_description_": ""
}
global_id = "r1_r_exit"
esc_script = "res://game/rooms/room01/esc/right_exit.esc"
is_exit = true
tooltip_name = "Exit"
default_action = "walk"
dialog_color = Color( 1, 1, 1, 1 )
animations = null
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
polygon = PoolVector2Array( 1177.94, 348.61, 1175.95, 45.3759, 1276.06, 92.0953, 1277.95, 399.407 )
[node name="Position2D" type="Position2D" parent="."]
position = Vector2( 1225.47, 353.99 )
script = ExtResource( 2 )

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=8 format=2]
[gd_scene load_steps=9 format=2]
[ext_resource path="res://game/rooms/room01/walkable_area.tscn" type="PackedScene" id=1]
[ext_resource path="res://game/rooms/room01/background.tscn" type="PackedScene" id=2]
@@ -7,6 +7,7 @@
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_item.gd" type="Script" 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_location.gd" type="Script" id=7]
[ext_resource path="res://game/rooms/room01/r_door.tscn" type="PackedScene" id=8]
[node name="room1" type="Node2D"]
script = ExtResource( 6 )
@@ -47,26 +48,7 @@ position = Vector2( 3.5636, 0 )
[node name="Hotspots" type="Node2D" parent="."]
[node name="r_door" type="Area2D" parent="Hotspots"]
pause_mode = 1
script = ExtResource( 5 )
__meta__ = {
"_editor_description_": ""
}
global_id = "r1_r_exit"
esc_script = "res://game/rooms/room01/esc/right_exit.esc"
is_exit = true
tooltip_name = "Exit"
default_action = "walk"
dialog_color = Color( 1, 1, 1, 1 )
animations = null
[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 )
script = ExtResource( 7 )
[node name="r_door" parent="Hotspots" instance=ExtResource( 8 )]
[node name="item" type="Area2D" parent="Hotspots"]
pause_mode = 1

View File

@@ -21,3 +21,10 @@ points = PoolVector2Array( 6.61201, 704.409, 6.61203, 389.558, 87.755, 339.775,
__meta__ = {
"_editor_description_": ""
}
[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, 1188.64, 624.843 )
__meta__ = {
"_editor_description_": ""
}

View File

@@ -1,2 +1,3 @@
:exit_scene
set_sound_state bg_sound res://game/sfx/sounds/doorOpen_2.ogg false
change_scene "res://game/rooms/room11/room11.tscn"

View File

@@ -1,130 +1,25 @@
[gd_scene load_steps=4 format=2]
[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="Animation" id=1]
resource_name = "r_door_close"
tracks/0/type = "value"
tracks/0/path = NodePath("r_door_closed:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("r_door_opened:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}
tracks/2/type = "value"
tracks/2/path = NodePath(".:is_exit")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}
tracks/3/type = "value"
tracks/3/path = NodePath(".:default_action")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ "look" ]
}
[sub_resource type="Animation" id=2]
resource_name = "r_door_open"
length = 0.3
tracks/0/type = "value"
tracks/0/path = NodePath("r_door_closed:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("r_door_opened:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
tracks/2/type = "value"
tracks/2/path = NodePath(".:is_exit")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
tracks/3/type = "value"
tracks/3/path = NodePath(".:default_action")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ "walk" ]
}
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" id=2]
[node name="r_door" type="Area2D"]
pause_mode = 1
script = ExtResource( 1 )
global_id = "r9_door"
esc_script = "res://game/rooms/room9/esc/r9_door.esc"
tooltip_name = "Door"
default_action = "look"
__meta__ = {
"_editor_description_": ""
}
global_id = "r1_r_exit"
esc_script = "res://game/rooms/room01/esc/right_exit.esc"
is_exit = true
tooltip_name = "Exit"
default_action = "walk"
dialog_color = Color( 1, 1, 1, 1 )
[node name="r_door_closed" type="Polygon2D" parent="."]
color = Color( 0.482353, 0.568627, 1, 1 )
polygon = PoolVector2Array( 1172.3, 44.8186, 1172.3, 348.012, 1273.9, 401.983, 1277.07, 89.2657 )
[node name="r_door_opened" type="Polygon2D" parent="."]
visible = false
color = Color( 0.482353, 0.568627, 1, 1 )
polygon = PoolVector2Array( 1172.3, 44.8186, 1172.3, 348.012, 1029.82, 349.887, 1025.19, 42.1269 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/r_door_close = SubResource( 1 )
anims/r_door_open = SubResource( 2 )
animations = null
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
polygon = PoolVector2Array( 1169.35, 41.7644, 1168.09, 347.925, 1275.18, 407.141, 1278.96, 88.3814 )
polygon = PoolVector2Array( 1177.94, 348.61, 1175.95, 45.3759, 1276.06, 92.0953, 1277.95, 399.407 )
[node name="Position2D" type="Position2D" parent="."]
position = Vector2( 1225.47, 353.99 )
script = ExtResource( 2 )

View File

@@ -49,6 +49,7 @@ __meta__ = {
[node name="Hotspots" type="Node2D" parent="."]
[node name="l_door" type="Area2D" parent="Hotspots"]
pause_mode = 1
script = ExtResource( 7 )
global_id = "r10_l_exit"
esc_script = "res://game/rooms/room10/esc/left_exit.esc"
@@ -66,14 +67,15 @@ position = Vector2( 37.4521, 392.045 )
script = ExtResource( 5 )
[node name="r_door" parent="Hotspots" instance=ExtResource( 9 )]
global_id = "r10_r_exit"
esc_script = "res://game/rooms/room10/esc/right_exit.esc"
animations = null
[node name="Position2D" type="Position2D" parent="Hotspots/r_door"]
position = Vector2( 1198.65, 391.058 )
script = ExtResource( 5 )
[node name="button_stop_bg_music" parent="Hotspots" instance=ExtResource( 8 )]
pause_mode = 1
position = Vector2( 243.165, 154.97 )
global_id = "r10_btn_stop_bg_music"
esc_script = "res://game/rooms/room10/esc/button_stop_bg_music.esc"
@@ -95,6 +97,7 @@ __meta__ = {
}
[node name="button_play_bg_music" parent="Hotspots" instance=ExtResource( 8 )]
pause_mode = 1
position = Vector2( 377.976, 154.97 )
global_id = "r10_btn_play_bg_music"
esc_script = "res://game/rooms/room10/esc/button_play_bg_music.esc"
@@ -116,6 +119,7 @@ __meta__ = {
}
[node name="button_play_sound" parent="Hotspots" instance=ExtResource( 8 )]
pause_mode = 1
position = Vector2( 646.339, 154.97 )
global_id = "r10_btn_play_snd"
esc_script = "res://game/rooms/room10/esc/button_play_snd.esc"
@@ -137,6 +141,7 @@ __meta__ = {
}
[node name="button_accept_input" parent="Hotspots" instance=ExtResource( 8 )]
pause_mode = 1
position = Vector2( 823.113, 155.354 )
global_id = "test_accept_input"
esc_script = "res://game/rooms/room10/esc/button_accept_input_test.esc"
@@ -161,6 +166,7 @@ script = ExtResource( 5 )
global_id = "accept_input_location"
[node name="button_slide" parent="Hotspots" instance=ExtResource( 8 )]
pause_mode = 1
position = Vector2( 939.497, 154.301 )
global_id = "button_slide"
esc_script = "res://game/rooms/room10/esc/button_slide.esc"
@@ -184,6 +190,7 @@ script = ExtResource( 5 )
global_id = "slide_location"
[node name="button_turn_to" parent="Hotspots" instance=ExtResource( 8 )]
pause_mode = 1
position = Vector2( 1041.66, 152.721 )
global_id = "button_turn_to"
esc_script = "res://game/rooms/room10/esc/button_turn_to.esc"

View File

@@ -0,0 +1,30 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_background.gd" type="Script" id=1]
[node name="background" type="TextureRect"]
margin_right = 1289.0
margin_bottom = 555.0
mouse_filter = 2
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="l_platform" type="Line2D" parent="."]
position = Vector2( 2, -266 )
points = PoolVector2Array( -2.96298, 712.01, 129.973, 614.429, 1167.5, 612.894, 1274.59, 669.705, 1273.25, 812.694, 2.36697, 811.043, 2.36697, 713.389 )
[node name="l_door" type="Line2D" parent="."]
position = Vector2( 0, -266 )
points = PoolVector2Array( 6.61201, 704.409, 6.61203, 389.558, 87.755, 339.775, 87.5463, 649.784 )
__meta__ = {
"_editor_description_": ""
}
[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, 1188.64, 624.843 )
__meta__ = {
"_editor_description_": ""
}

View File

@@ -0,0 +1,5 @@
:exit_scene
set_sound_state bg_sound res://game/sfx/sounds/doorOpen_2.ogg false
change_scene "res://game/rooms/room10/room10.tscn"

View File

@@ -0,0 +1,5 @@
:use
transition curtain out
wait 2
transition fade_black in

View File

@@ -0,0 +1,3 @@
:look | NO_HUD
say player "NO_HUD"

View File

@@ -0,0 +1,3 @@
:look | NO_SAVE
say player "NO_SAVE"

View File

@@ -0,0 +1,3 @@
:look | NO_TT
say player "NO_TT."

View File

@@ -0,0 +1,3 @@
:look | TK
say player "TK"

View File

@@ -0,0 +1,5 @@
:exit_scene
set_sound_state bg_sound res://game/sfx/sounds/doorOpen_2.ogg false
transition fade_black out
change_scene "res://game/rooms/room12/room12.tscn" true

View File

@@ -0,0 +1,18 @@
:setup
set_state bg_music off false
> [eq ESC_LAST_SCENE room10]
teleport player r11_l_exit
# Set player look right
set_angle player 180
stop
> [eq ESC_LAST_SCENE room12]
teleport player r11_r_exit
# Set player look left
set_angle player 270
stop
> [!last_scene]
teleport player player_start
stop

View File

@@ -0,0 +1,20 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_item.gd" type="Script" id=1]
[node name="r_door" type="Area2D"]
pause_mode = 1
script = ExtResource( 1 )
__meta__ = {
"_editor_description_": ""
}
global_id = "r1_r_exit"
esc_script = "res://game/rooms/room01/esc/right_exit.esc"
is_exit = true
tooltip_name = "Exit"
default_action = "walk"
dialog_color = Color( 1, 1, 1, 1 )
animations = null
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
polygon = PoolVector2Array( 1177.94, 348.61, 1175.95, 45.3759, 1276.06, 92.0953, 1277.95, 399.407 )

View File

@@ -0,0 +1,243 @@
[gd_scene load_steps=11 format=2]
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_terrain.gd" type="Script" id=1]
[ext_resource path="res://game/rooms/room11/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://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" 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]
[ext_resource path="res://game/rooms/room11/r_door.tscn" type="PackedScene" id=8]
[sub_resource type="NavigationPolygon" id=1]
vertices = PoolVector2Array( 1168.92, 640.557, 1182.53, 588.863, 1269.59, 622.872, 1275.03, 799.721, 864.626, 613.518, 1143.08, 613.35, -9.16094, 803.802, 386.666, 618.012, 129.634, 615.792, 84.5821, 654.06, -6.44019, 711.297, 3.15687, 646.051, 59.2201, 628.698 )
polygons = [ PoolIntArray( 0, 1, 2, 3 ), PoolIntArray( 4, 5, 0, 3, 6, 7 ), PoolIntArray( 8, 7, 6, 9 ), PoolIntArray( 9, 6, 10, 11, 12 ) ]
outlines = [ PoolVector2Array( -6.44019, 711.297, 3.15687, 646.051, 59.2201, 628.698, 84.5821, 654.06, 129.634, 615.792, 386.666, 618.012, 864.626, 613.518, 1143.08, 613.35, 1168.92, 640.557, 1182.53, 588.863, 1269.59, 622.872, 1275.03, 799.721, -9.16094, 803.802 ) ]
[sub_resource type="CircleShape2D" id=2]
radius = 53.6249
[node name="room11" type="Node2D"]
script = ExtResource( 6 )
__meta__ = {
"_edit_vertical_guides_": [ ]
}
global_id = "room11"
esc_script = "res://game/rooms/room11/esc/room11.esc"
player_scene = ExtResource( 4 )
camera_limits = [ Rect2( 0, 0, 1289, 555 ) ]
[node name="background" parent="." instance=ExtResource( 2 )]
[node name="room_label" type="Label" parent="background"]
margin_right = 92.0
margin_bottom = 21.0
custom_fonts/font = ExtResource( 3 )
text = "ROOM 11"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="walkable_area" type="Navigation2D" parent="."]
script = ExtResource( 1 )
[node name="platform" type="NavigationPolygonInstance" parent="walkable_area"]
position = Vector2( 6.73163, -264.779 )
navpoly = SubResource( 1 )
__meta__ = {
"_editor_description_": ""
}
[node name="Hotspots" type="Node2D" parent="."]
[node name="l_door" type="Area2D" parent="Hotspots"]
pause_mode = 1
script = ExtResource( 7 )
global_id = "r11_l_exit"
esc_script = "res://game/rooms/room11/esc/left_exit.esc"
is_exit = true
tooltip_name = "Left exit"
default_action = "walk"
dialog_color = Color( 1, 1, 1, 1 )
animations = null
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Hotspots/l_door"]
polygon = PoolVector2Array( 0.328762, 440.897, 1.85199, 119.926, 85.9517, 74.6212, 87.1409, 377.869 )
[node name="ESCLocation" type="Position2D" parent="Hotspots/l_door"]
position = Vector2( 37.4521, 392.045 )
script = ExtResource( 5 )
[node name="r_door" parent="Hotspots" instance=ExtResource( 8 )]
global_id = "r11_r_exit"
esc_script = "res://game/rooms/room11/esc/right_exit.esc"
[node name="ESCLocation" type="Position2D" parent="Hotspots/r_door"]
position = Vector2( 1236.02, 366.281 )
script = ExtResource( 5 )
[node name="circleTK" type="Area2D" parent="Hotspots"]
pause_mode = 1
position = Vector2( -422.136, 0 )
script = ExtResource( 7 )
global_id = "r11_circle_tk"
esc_script = "res://game/rooms/room11/esc/mysterious_circle_tk.esc"
tooltip_name = "Mysterious circle"
dialog_color = Color( 1, 1, 1, 1 )
animations = null
[node name="Polygon2D" type="Polygon2D" parent="Hotspots/circleTK"]
position = Vector2( 50.9425, -76.4136 )
polygon = PoolVector2Array( 555.881, 185.538, 519.921, 215.504, 525.914, 257.456, 552.884, 282.928, 587.345, 284.426, 623.305, 260.453, 623.305, 219.999, 594.837, 187.036 )
[node name="ESCLocation" type="Position2D" parent="Hotspots/circleTK"]
position = Vector2( 624.794, 379.072 )
script = ExtResource( 5 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hotspots/circleTK"]
position = Vector2( 623.668, 159.806 )
shape = SubResource( 2 )
[node name="Label" type="Label" parent="Hotspots/circleTK"]
margin_left = 700.416
margin_top = 152.655
margin_right = 756.416
margin_bottom = 166.655
text = "FLAG: TK"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="circleNoTT" type="Area2D" parent="Hotspots"]
pause_mode = 1
position = Vector2( -151.623, 0 )
script = ExtResource( 7 )
global_id = "r11_circle_nott"
esc_script = "res://game/rooms/room11/esc/mysterious_circle_nott.esc"
tooltip_name = "Mysterious circle"
dialog_color = Color( 1, 1, 1, 1 )
animations = null
[node name="Polygon2D" type="Polygon2D" parent="Hotspots/circleNoTT"]
position = Vector2( 50.9425, -76.4136 )
polygon = PoolVector2Array( 555.881, 185.538, 519.921, 215.504, 525.914, 257.456, 552.884, 282.928, 587.345, 284.426, 623.305, 260.453, 623.305, 219.999, 594.837, 187.036 )
[node name="ESCLocation" type="Position2D" parent="Hotspots/circleNoTT"]
position = Vector2( 624.794, 379.072 )
script = ExtResource( 5 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hotspots/circleNoTT"]
position = Vector2( 623.668, 159.806 )
shape = SubResource( 2 )
[node name="Label" type="Label" parent="Hotspots/circleNoTT"]
margin_left = 691.437
margin_top = 152.655
margin_right = 773.437
margin_bottom = 166.655
text = "FLAG: NO_TT"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="circleNoHUD" type="Area2D" parent="Hotspots"]
pause_mode = 1
position = Vector2( 118.891, 0 )
script = ExtResource( 7 )
global_id = "r11_circle_nohud"
esc_script = "res://game/rooms/room11/esc/mysterious_circle_nohud.esc"
tooltip_name = "Mysterious circle"
dialog_color = Color( 1, 1, 1, 1 )
animations = null
[node name="Polygon2D" type="Polygon2D" parent="Hotspots/circleNoHUD"]
position = Vector2( 50.9425, -76.4136 )
polygon = PoolVector2Array( 555.881, 185.538, 519.921, 215.504, 525.914, 257.456, 552.884, 282.928, 587.345, 284.426, 623.305, 260.453, 623.305, 219.999, 594.837, 187.036 )
[node name="ESCLocation" type="Position2D" parent="Hotspots/circleNoHUD"]
position = Vector2( 624.794, 379.072 )
script = ExtResource( 5 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hotspots/circleNoHUD"]
position = Vector2( 623.668, 159.806 )
shape = SubResource( 2 )
[node name="Label" type="Label" parent="Hotspots/circleNoHUD"]
margin_left = 691.437
margin_top = 152.655
margin_right = 773.437
margin_bottom = 166.655
text = "FLAG: NO_HUD"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="circleNoSave" type="Area2D" parent="Hotspots"]
pause_mode = 1
position = Vector2( 366.891, 0 )
script = ExtResource( 7 )
global_id = "r11_circle_nosave"
esc_script = "res://game/rooms/room11/esc/mysterious_circle_nosave.esc"
tooltip_name = "Mysterious circle"
dialog_color = Color( 1, 1, 1, 1 )
animations = null
[node name="Polygon2D" type="Polygon2D" parent="Hotspots/circleNoSave"]
position = Vector2( 50.9425, -76.4136 )
polygon = PoolVector2Array( 555.881, 185.538, 519.921, 215.504, 525.914, 257.456, 552.884, 282.928, 587.345, 284.426, 623.305, 260.453, 623.305, 219.999, 594.837, 187.036 )
[node name="ESCLocation" type="Position2D" parent="Hotspots/circleNoSave"]
position = Vector2( 624.794, 379.072 )
script = ExtResource( 5 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hotspots/circleNoSave"]
position = Vector2( 623.668, 159.806 )
shape = SubResource( 2 )
[node name="Label" type="Label" parent="Hotspots/circleNoSave"]
margin_left = 691.437
margin_top = 152.655
margin_right = 773.437
margin_bottom = 166.655
text = "FLAG: NO_SAVE"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="circleFadeIn" type="Area2D" parent="Hotspots"]
pause_mode = 1
position = Vector2( -11.1087, 107 )
script = ExtResource( 7 )
global_id = "r11_circle_fadein"
esc_script = "res://game/rooms/room11/esc/mysterious_circle_fadein.esc"
tooltip_name = "Mysterious circle"
dialog_color = Color( 1, 1, 1, 1 )
animations = null
[node name="Polygon2D" type="Polygon2D" parent="Hotspots/circleFadeIn"]
position = Vector2( 50.9425, -76.4136 )
polygon = PoolVector2Array( 555.881, 185.538, 519.921, 215.504, 525.914, 257.456, 552.884, 282.928, 587.345, 284.426, 623.305, 260.453, 623.305, 219.999, 594.837, 187.036 )
[node name="ESCLocation" type="Position2D" parent="Hotspots/circleFadeIn"]
position = Vector2( 624.794, 274.072 )
script = ExtResource( 5 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hotspots/circleFadeIn"]
position = Vector2( 623.668, 159.806 )
shape = SubResource( 2 )
[node name="Label" type="Label" parent="Hotspots/circleFadeIn"]
margin_left = 691.437
margin_top = 152.655
margin_right = 773.437
margin_bottom = 166.655
text = "FADE OUT -> FADE IN"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="player_start" type="Position2D" parent="."]
position = Vector2( 542.824, 468.193 )
script = ExtResource( 5 )
global_id = "player_start"
is_start_location = true

View File

@@ -0,0 +1,18 @@
[gd_scene load_steps=3 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( 1168.92, 640.557, 1182.53, 588.863, 1269.59, 622.872, 1275.03, 799.721, 129.634, 615.792, 1143.08, 613.35, -9.16094, 803.802, 84.5821, 654.06, -6.44019, 711.297, 3.15687, 646.051, 59.2201, 628.698 )
polygons = [ PoolIntArray( 0, 1, 2, 3 ), PoolIntArray( 4, 5, 0, 3, 6, 7 ), PoolIntArray( 7, 6, 8, 9, 10 ) ]
outlines = [ PoolVector2Array( -6.44019, 711.297, 3.15687, 646.051, 59.2201, 628.698, 84.5821, 654.06, 129.634, 615.792, 1143.08, 613.35, 1168.92, 640.557, 1182.53, 588.863, 1269.59, 622.872, 1275.03, 799.721, -9.16094, 803.802 ) ]
[node name="walkable_area" type="Navigation2D"]
script = ExtResource( 1 )
[node name="platform" type="NavigationPolygonInstance" parent="."]
position = Vector2( 6.73163, -264.779 )
navpoly = SubResource( 1 )
__meta__ = {
"_editor_description_": ""
}

View File

@@ -0,0 +1,30 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_background.gd" type="Script" id=1]
[node name="background" type="TextureRect"]
margin_right = 1289.0
margin_bottom = 555.0
mouse_filter = 2
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="l_platform" type="Line2D" parent="."]
position = Vector2( 2, -266 )
points = PoolVector2Array( -2.96298, 712.01, 129.973, 614.429, 1167.5, 612.894, 1274.59, 669.705, 1273.25, 812.694, 2.36697, 811.043, 2.36697, 713.389 )
[node name="l_door" type="Line2D" parent="."]
position = Vector2( 0, -266 )
points = PoolVector2Array( 6.61201, 704.409, 6.61203, 389.558, 87.755, 339.775, 87.5463, 649.784 )
__meta__ = {
"_editor_description_": ""
}
[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, 1188.64, 624.843 )
__meta__ = {
"_editor_description_": ""
}

View File

@@ -0,0 +1,5 @@
:exit_scene
set_sound_state bg_sound res://game/sfx/sounds/doorOpen_2.ogg false
change_scene "res://game/rooms/room11/room11.tscn"

View 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/room13/room13.tscn"

View File

@@ -0,0 +1,21 @@
:setup
> [eq ESC_LAST_SCENE room11]
teleport player r12_l_exit
# Set player look right
set_angle player 180
stop
> [eq ESC_LAST_SCENE room13]
teleport player r12_r_exit
# Set player look left
set_angle player 270
stop
> [!last_scene]
teleport player player_start
stop
:ready
transition fade_white in

View 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]
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" id=2]
[node name="r_door" type="Area2D"]
pause_mode = 1
script = ExtResource( 1 )
__meta__ = {
"_editor_description_": ""
}
global_id = "r1_r_exit"
esc_script = "res://game/rooms/room01/esc/right_exit.esc"
is_exit = true
tooltip_name = "Exit"
default_action = "walk"
dialog_color = Color( 1, 1, 1, 1 )
animations = null
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
polygon = PoolVector2Array( 1177.94, 348.61, 1175.95, 45.3759, 1276.06, 92.0953, 1277.95, 399.407 )
[node name="Position2D" type="Position2D" parent="."]
position = Vector2( 1225.47, 353.99 )
script = ExtResource( 2 )

View File

@@ -0,0 +1,82 @@
[gd_scene load_steps=10 format=2]
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_terrain.gd" type="Script" id=1]
[ext_resource path="res://game/rooms/room12/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://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" 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]
[ext_resource path="res://game/rooms/room12/r_door.tscn" type="PackedScene" id=8]
[sub_resource type="NavigationPolygon" id=1]
vertices = PoolVector2Array( 1168.92, 640.557, 1182.53, 588.863, 1269.59, 622.872, 1275.03, 799.721, 864.626, 613.518, 1143.08, 613.35, -9.16094, 803.802, 386.666, 618.012, 129.634, 615.792, 84.5821, 654.06, -6.44019, 711.297, 3.15687, 646.051, 59.2201, 628.698 )
polygons = [ PoolIntArray( 0, 1, 2, 3 ), PoolIntArray( 4, 5, 0, 3, 6, 7 ), PoolIntArray( 8, 7, 6, 9 ), PoolIntArray( 9, 6, 10, 11, 12 ) ]
outlines = [ PoolVector2Array( -6.44019, 711.297, 3.15687, 646.051, 59.2201, 628.698, 84.5821, 654.06, 129.634, 615.792, 386.666, 618.012, 864.626, 613.518, 1143.08, 613.35, 1168.92, 640.557, 1182.53, 588.863, 1269.59, 622.872, 1275.03, 799.721, -9.16094, 803.802 ) ]
[node name="room12" type="Node2D"]
script = ExtResource( 6 )
__meta__ = {
"_edit_vertical_guides_": [ ]
}
global_id = "room12"
esc_script = "res://game/rooms/room12/esc/room12.esc"
player_scene = ExtResource( 4 )
camera_limits = [ Rect2( 0, 0, 1289, 555 ) ]
[node name="background" parent="." instance=ExtResource( 2 )]
[node name="room_label" type="Label" parent="background"]
margin_right = 92.0
margin_bottom = 21.0
custom_fonts/font = ExtResource( 3 )
text = "ROOM 12
"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="walkable_area" type="Navigation2D" parent="."]
script = ExtResource( 1 )
[node name="platform" type="NavigationPolygonInstance" parent="walkable_area"]
position = Vector2( 6.73163, -264.779 )
navpoly = SubResource( 1 )
__meta__ = {
"_editor_description_": ""
}
[node name="Hotspots" type="Node2D" parent="."]
[node name="l_door" type="Area2D" parent="Hotspots"]
pause_mode = 1
script = ExtResource( 7 )
global_id = "r12_l_exit"
esc_script = "res://game/rooms/room12/esc/left_exit.esc"
is_exit = true
tooltip_name = "Left exit"
default_action = "walk"
dialog_color = Color( 1, 1, 1, 1 )
animations = null
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Hotspots/l_door"]
polygon = PoolVector2Array( 0.328762, 440.897, 1.85199, 119.926, 85.9517, 74.6212, 87.1409, 377.869 )
[node name="Position2D" type="Position2D" parent="Hotspots/l_door"]
position = Vector2( 37.4521, 392.045 )
script = ExtResource( 5 )
global_id = "r12_l_exit"
[node name="r_door" parent="Hotspots" instance=ExtResource( 8 )]
global_id = "r12_r_exit"
esc_script = "res://game/rooms/room12/esc/right_exit.esc"
[node name="ESCLocation" type="Position2D" parent="Hotspots/r_door"]
position = Vector2( 1231.78, 360.624 )
script = ExtResource( 5 )
[node name="player_start" type="Position2D" parent="."]
position = Vector2( 542.824, 468.193 )
script = ExtResource( 5 )
global_id = "player_start"
is_start_location = true

View File

@@ -0,0 +1,18 @@
[gd_scene load_steps=3 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( 1168.92, 640.557, 1182.53, 588.863, 1269.59, 622.872, 1275.03, 799.721, 129.634, 615.792, 1143.08, 613.35, -9.16094, 803.802, 84.5821, 654.06, -6.44019, 711.297, 3.15687, 646.051, 59.2201, 628.698 )
polygons = [ PoolIntArray( 0, 1, 2, 3 ), PoolIntArray( 4, 5, 0, 3, 6, 7 ), PoolIntArray( 7, 6, 8, 9, 10 ) ]
outlines = [ PoolVector2Array( -6.44019, 711.297, 3.15687, 646.051, 59.2201, 628.698, 84.5821, 654.06, 129.634, 615.792, 1143.08, 613.35, 1168.92, 640.557, 1182.53, 588.863, 1269.59, 622.872, 1275.03, 799.721, -9.16094, 803.802 ) ]
[node name="walkable_area" type="Navigation2D"]
script = ExtResource( 1 )
[node name="platform" type="NavigationPolygonInstance" parent="."]
position = Vector2( 6.73163, -264.779 )
navpoly = SubResource( 1 )
__meta__ = {
"_editor_description_": ""
}

View File

@@ -27,3 +27,12 @@ change_scene res://game/rooms/room01/room01.tscn
# 9/ Indy4 3 closets
#change_scene res://game/rooms/room09/room09.tscn
# 10/
#change_scene res://game/rooms/room10/room10.tscn
# 11/ Event flags tests
#change_scene res://game/rooms/room11/room11.tscn
# 12/ Event flags tests 2
#change_scene res://game/rooms/room12/room12.tscn

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

View File

@@ -1,34 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/guybrush.jpeg-2fc39d8d3de855fdd1e6fd25540a16ab.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://game/ui/commons/dialogs/insets/guybrush.jpeg"
dest_files=[ "res://.import/guybrush.jpeg-2fc39d8d3de855fdd1e6fd25540a16ab.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

@@ -2,7 +2,7 @@
[ext_resource path="res://game/ui/commons/main_menu/main_menu.gd" type="Script" id=1]
[ext_resource path="res://game/ui/commons/main_menu/main.tscn" type="PackedScene" id=2]
[ext_resource path="res://addons/escoria-core/logo/escoria-logo-small.png" type="Texture" id=3]
[ext_resource path="res://addons/escoria-core/design/escoria-logo-small.png" type="Texture" id=3]
[ext_resource path="res://game/ui/commons/options/options.tscn" type="PackedScene" id=4]
[ext_resource path="res://game/ui/commons/load/load_game.tscn" type="PackedScene" id=5]
@@ -28,9 +28,9 @@ anchor_bottom = 1.0
[node name="main" type="VBoxContainer" parent="Panel/CenterContainer"]
margin_left = 332.0
margin_top = 150.0
margin_top = 151.0
margin_right = 948.0
margin_bottom = 749.0
margin_bottom = 748.0
custom_constants/separation = 100
[node name="TextureRect" type="TextureRect" parent="Panel/CenterContainer/main"]
@@ -49,19 +49,26 @@ anchor_bottom = 0.0
margin_left = 0.0
margin_top = 336.0
margin_right = 616.0
margin_bottom = 599.0
margin_bottom = 597.0
[node name="new_game" parent="Panel/CenterContainer/main/buttons" index="0"]
margin_right = 616.0
margin_bottom = 150.0
[node name="load_game" parent="Panel/CenterContainer/main/buttons" index="1"]
margin_top = 160.0
margin_right = 616.0
margin_bottom = 187.0
[node name="options" parent="Panel/CenterContainer/main/buttons" index="2"]
margin_top = 197.0
margin_right = 616.0
margin_bottom = 224.0
[node name="quit" parent="Panel/CenterContainer/main/buttons" index="3"]
margin_top = 234.0
margin_right = 616.0
margin_bottom = 261.0
[node name="options" parent="Panel" instance=ExtResource( 4 )]
visible = false

View File

@@ -33,3 +33,7 @@ func _on_save_game_back_button_pressed():
func _on_load_game_back_button_pressed():
$Panel/CenterContainer/VBoxContainer.show()
$load_game.hide()
func set_save_enabled(p_enabled: bool):
$Panel/CenterContainer/VBoxContainer/menuitems/save_game.disabled = !p_enabled

View File

@@ -2,7 +2,7 @@
[ext_resource path="res://game/ui/commons/pause_menu/pause_menu.gd" type="Script" id=1]
[ext_resource path="res://game/ui/commons/fonts/caslonantique.tres" type="DynamicFont" id=2]
[ext_resource path="res://addons/escoria-core/logo/escoria-logo-small.png" type="Texture" id=3]
[ext_resource path="res://addons/escoria-core/design/escoria-logo-small.png" type="Texture" id=3]
[ext_resource path="res://game/ui/commons/save/save_game.tscn" type="PackedScene" id=4]
[ext_resource path="res://game/ui/commons/load/load_game.tscn" type="PackedScene" id=5]