diff --git a/scenes/doors/door_medium_horizontial.tscn b/scenes/doors/door_medium_horizontial.tscn new file mode 100644 index 0000000..b26da7d --- /dev/null +++ b/scenes/doors/door_medium_horizontial.tscn @@ -0,0 +1,104 @@ +[gd_scene load_steps=12 format=3 uid="uid://cs30mgkcn74is"] + +[ext_resource type="Script" uid="uid://b88ykyte6oi3i" path="res://scripts/door_medium_horizontial.gd" id="1_8opqd"] +[ext_resource type="Texture2D" uid="uid://djmlhid6f4xwi" path="res://textures/door_medium_horziontial.png" id="2_8opqd"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_ydv31"] +atlas = ExtResource("2_8opqd") +region = Rect2(384, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_tlrp8"] +atlas = ExtResource("2_8opqd") +region = Rect2(320, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ruhr2"] +atlas = ExtResource("2_8opqd") +region = Rect2(256, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_388o4"] +atlas = ExtResource("2_8opqd") +region = Rect2(192, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_apq5w"] +atlas = ExtResource("2_8opqd") +region = Rect2(128, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_kxlda"] +atlas = ExtResource("2_8opqd") +region = Rect2(64, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_5gimo"] +atlas = ExtResource("2_8opqd") +region = Rect2(0, 0, 64, 64) + +[sub_resource type="SpriteFrames" id="SpriteFrames_vvdds"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_ydv31") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_tlrp8") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ruhr2") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_388o4") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_apq5w") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_kxlda") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_5gimo") +}], +"loop": false, +"name": &"default", +"speed": 12.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_5gimo") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_kxlda") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_apq5w") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_388o4") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ruhr2") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_tlrp8") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ydv31") +}], +"loop": false, +"name": &"open", +"speed": 12.0 +}] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_bhfm6"] +size = Vector2(96, 32) + +[node name="DoorMediumHorizontial" type="StaticBody2D"] +scale = Vector2(2, 2) +script = ExtResource("1_8opqd") + +[node name="Sprite" type="AnimatedSprite2D" parent="."] +sprite_frames = SubResource("SpriteFrames_vvdds") +autoplay = "default" +frame = 6 +frame_progress = 1.0 + +[node name="CollisionShape" type="CollisionShape2D" parent="."] +position = Vector2(0, 16) +shape = SubResource("RectangleShape2D_bhfm6") diff --git a/scenes/locations/space_station_1.tscn b/scenes/locations/space_station_1.tscn index 13a4144..ddd1303 100644 --- a/scenes/locations/space_station_1.tscn +++ b/scenes/locations/space_station_1.tscn @@ -1,9 +1,10 @@ -[gd_scene load_steps=64 format=4 uid="uid://dfjnikjjynj0e"] +[gd_scene load_steps=69 format=4 uid="uid://dfjnikjjynj0e"] [ext_resource type="AudioStream" uid="uid://dgv01wy8r7ej2" path="res://sounds/uglyburger.mp3" id="1_kpeax"] [ext_resource type="Texture2D" uid="uid://btcap3oh2dqt8" path="res://textures/wall_tile.png" id="2_4uppp"] [ext_resource type="AudioStream" uid="uid://w3hai62ji61g" path="res://sounds/heart_monitor.mp3" id="2_v7oqm"] [ext_resource type="Texture2D" uid="uid://xs6tjca62pw1" path="res://textures/wall_side_tile.png" id="3_ir5n7"] +[ext_resource type="AudioStream" uid="uid://7cvp5b3mq1tn" path="res://sounds/music/dnbd_sudden.mp3" id="3_kl2qk"] [ext_resource type="Texture2D" uid="uid://ddfp7u4a7llnr" path="res://textures/wall_side_tile_left.png" id="4_50pdk"] [ext_resource type="Texture2D" uid="uid://gl7rcrys46ay" path="res://textures/wall_side_tile_right.png" id="5_83fjc"] [ext_resource type="Texture2D" uid="uid://cj5sjx1jhrah6" path="res://textures/wall_side_tile_center.png" id="6_akl5n"] @@ -18,13 +19,17 @@ [ext_resource type="Texture2D" uid="uid://dtwo7g0ipc4k" path="res://textures/ship_1.png" id="13_vmpfq"] [ext_resource type="Script" uid="uid://khas1kkt2t3k" path="res://scripts/exit_ship.gd" id="14_jxmby"] [ext_resource type="Script" uid="uid://mmptv0l2ahhh" path="res://scripts/doctor.gd" id="14_vmimc"] +[ext_resource type="Script" uid="uid://cytses4dvcif2" path="res://scripts/doctor_2.gd" id="16_bhfm6"] +[ext_resource type="Texture2D" uid="uid://csrlh1sbdroud" path="res://textures/pistol.png" id="16_mdep3"] [ext_resource type="Texture2D" uid="uid://ktvnppfhchoj" path="res://textures/bed.png" id="17_50pdk"] +[ext_resource type="AudioStream" uid="uid://5x8fl2mk082h" path="res://sounds/gunshot_1.mp3" id="17_bhfm6"] [ext_resource type="Texture2D" uid="uid://b0c5hws6ki8p5" path="res://textures/door_large_vertical.png" id="17_vmpfq"] [ext_resource type="Texture2D" uid="uid://cmv4wou5glrl7" path="res://textures/bed_foot.png" id="18_83fjc"] [ext_resource type="Texture2D" uid="uid://bgui3ranlk441" path="res://textures/locker.png" id="18_jxmby"] [ext_resource type="Texture2D" uid="uid://iim42wat824h" path="res://textures/door_large_horizontial.png" id="18_vmimc"] [ext_resource type="Script" uid="uid://cva4b60iqolqy" path="res://scripts/story_handler_1.gd" id="19_akl5n"] [ext_resource type="PackedScene" uid="uid://dh3psx6ilrtql" path="res://scenes/enemy_ground.tscn" id="22_janyw"] +[ext_resource type="PackedScene" uid="uid://cs30mgkcn74is" path="res://scenes/doors/door_medium_horizontial.tscn" id="23_ga4dw"] [ext_resource type="Texture2D" uid="uid://bahp733iqv2us" path="res://textures/desk.png" id="26_vmpfq"] [ext_resource type="AudioStream" uid="uid://c13fyse8fxmio" path="res://sounds/intrusion_alarm.mp3" id="28_k741b"] [ext_resource type="AudioStream" uid="uid://f6l56kvndidj" path="res://sounds/background_gunshots.mp3" id="28_vmimc"] @@ -41,6 +46,7 @@ texture = ExtResource("2_4uppp") 0:0/0 = 0 0:0/0/occlusion_layer_0/polygon_0/polygon = SubResource("OccluderPolygon2D_gysiw") 0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +0:0/0/physics_layer_1/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_mdep3"] texture = ExtResource("3_ir5n7") @@ -93,8 +99,9 @@ texture_region_size = Vector2i(32, 32) [sub_resource type="TileSet" id="TileSet_uxsmb"] tile_size = Vector2i(32, 32) occlusion_layer_0/light_mask = 1 -physics_layer_0/collision_layer = 3 -physics_layer_0/collision_mask = 3 +physics_layer_0/collision_layer = 1 +physics_layer_1/collision_layer = 2 +physics_layer_1/collision_mask = 2 navigation_layer_0/layers = 1 sources/0 = SubResource("TileSetAtlasSource_k741b") sources/1 = SubResource("TileSetAtlasSource_mdep3") @@ -240,7 +247,7 @@ size = Vector2(40, 40) size = Vector2(223, 442) [sub_resource type="RectangleShape2D" id="RectangleShape2D_vmimc"] -size = Vector2(353, 401) +size = Vector2(353, 655) [sub_resource type="RectangleShape2D" id="RectangleShape2D_83fjc"] size = Vector2(61.5, 21) @@ -260,6 +267,11 @@ parameters/looping = true stream = ExtResource("2_v7oqm") parameters/looping = true +[node name="Dnbd" type="AudioStreamPlayer" parent="."] +stream = ExtResource("3_kl2qk") +volume_db = -8.0 +bus = &"Music" + [node name="Map" type="TileMapLayer" parent="."] modulate = Color(0.53333336, 0.53333336, 0.53333336, 1) z_index = -4096 @@ -329,9 +341,22 @@ collision_mask = 2 shape = SubResource("CapsuleShape2D_janyw") debug_color = Color(1, 0, 0, 0.41960785) +[node name="HospitalEscapeD2State1" type="Area2D" parent="."] +position = Vector2(1216, -1408) + +[node name="CollisionShape" type="CollisionShape2D" parent="HospitalEscapeD2State1"] +position = Vector2(-144, 0) +shape = SubResource("CircleShape2D_janyw") + +[node name="HospitalEscapeD2State2" type="Area2D" parent="."] +position = Vector2(1360, -1072) + +[node name="CollisionShape" type="CollisionShape2D" parent="HospitalEscapeD2State2"] +shape = SubResource("CircleShape2D_janyw") + [node name="Doctor2" type="CharacterBody2D" parent="."] position = Vector2(1664, -1328) -script = ExtResource("14_vmimc") +script = ExtResource("16_bhfm6") [node name="Sprite" type="AnimatedSprite2D" parent="Doctor2"] scale = Vector2(-2, 2) @@ -341,13 +366,6 @@ sprite_frames = SubResource("SpriteFrames_c5r8y") position = Vector2(0, 40) shape = SubResource("CapsuleShape2D_2ss3m") -[node name="InteractArea" type="Area2D" parent="Doctor2"] -script = ExtResource("10_tvsp8") -interact_text = "TALK" - -[node name="CollisionShape" type="CollisionShape2D" parent="Doctor2/InteractArea"] -shape = SubResource("CircleShape2D_janyw") - [node name="Navagent" type="NavigationAgent2D" parent="Doctor2"] path_desired_distance = 34.0 target_desired_distance = 34.0 @@ -361,6 +379,22 @@ collision_mask = 2 shape = SubResource("CapsuleShape2D_janyw") debug_color = Color(1, 0, 0, 0.41960785) +[node name="HeldItem" type="Node2D" parent="Doctor2"] + +[node name="Cast" type="RayCast2D" parent="Doctor2/HeldItem"] +position = Vector2(64, 0) +target_position = Vector2(2048, 0) +collision_mask = 2 +collide_with_areas = true + +[node name="Sprite" type="Sprite2D" parent="Doctor2/HeldItem"] +position = Vector2(56, 0) +texture = ExtResource("16_mdep3") + +[node name="Gunshot" type="AudioStreamPlayer2D" parent="Doctor2/HeldItem"] +stream = ExtResource("17_bhfm6") +bus = &"Sound Effects" + [node name="GalactaCounter" type="StaticBody2D" parent="."] position = Vector2(-64, -883) scale = Vector2(2, 2) @@ -392,6 +426,16 @@ texture = ExtResource("17_vmpfq") [node name="CollisionShape2D" type="CollisionShape2D" parent="MedbayDoorLargeVertical3"] shape = SubResource("RectangleShape2D_whbip") +[node name="MedbayDoorLargeVertical6" type="StaticBody2D" parent="."] +position = Vector2(224, -3104) +scale = Vector2(2, 2) + +[node name="Sprite" type="Sprite2D" parent="MedbayDoorLargeVertical6"] +texture = ExtResource("17_vmpfq") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="MedbayDoorLargeVertical6"] +shape = SubResource("RectangleShape2D_whbip") + [node name="MedbayDoorLargeVertical2" type="StaticBody2D" parent="."] position = Vector2(352, -1280) scale = Vector2(2, 2) @@ -403,6 +447,20 @@ texture = ExtResource("18_vmimc") position = Vector2(0, 16) shape = SubResource("RectangleShape2D_bhfm6") +[node name="MedbayDoorLargeVertical5" type="StaticBody2D" parent="."] +position = Vector2(352, -1280) +scale = Vector2(2, 2) + +[node name="Sprite" type="Sprite2D" parent="MedbayDoorLargeVertical5"] +texture = ExtResource("18_vmimc") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="MedbayDoorLargeVertical5"] +position = Vector2(0, 16) +shape = SubResource("RectangleShape2D_bhfm6") + +[node name="Doctor2DoorToOpen" parent="." instance=ExtResource("23_ga4dw")] +position = Vector2(1344, -960) + [node name="MedbayDoorLargeVertical4" type="StaticBody2D" parent="."] position = Vector2(352, -2432) scale = Vector2(2, 2) @@ -499,14 +557,29 @@ position = Vector2(126, -1796) position = Vector2(-1119, -1537) [node name="DoctorHallWaypoint" type="Node2D" parent="."] -position = Vector2(-730, -1375) +position = Vector2(-768, -1376) + +[node name="Doctor2DoorWaypoint" type="Node2D" parent="."] +position = Vector2(1376, -1056) [node name="CamperSpawn1" type="Node2D" parent="."] position = Vector2(-1248, -1984) +[node name="CamperSpawn2" type="Node2D" parent="."] +position = Vector2(-544, -1408) + +[node name="CamperSpawn3" type="Node2D" parent="."] +position = Vector2(992, -32) + +[node name="CamperSpawn4" type="Node2D" parent="."] +position = Vector2(1632, 752) + [node name="Checkpoint1PlayerSpawn" type="Node2D" parent="."] position = Vector2(-928, -2112) +[node name="Checkpoint2PlayerSpawn" type="Node2D" parent="."] +position = Vector2(1312, -1056) + [node name="Checkpoint1DoctorSpawn" type="Node2D" parent="."] position = Vector2(-864, -2224) @@ -527,7 +600,7 @@ position = Vector2(-827, -3082) position = Vector2(-52, 45) [node name="CollisionShape2D" type="CollisionShape2D" parent="DoctorEscapeWaypoint2/Area"] -position = Vector2(146.5, 70.5) +position = Vector2(146.5, 197.5) shape = SubResource("RectangleShape2D_vmimc") [node name="StoryHandler1" type="Node2D" parent="."] @@ -613,23 +686,41 @@ position = Vector2(-0.25, 37.5) shape = SubResource("RectangleShape2D_83fjc") [node name="Camper1" parent="." instance=ExtResource("22_janyw")] -position = Vector2(33, -3149) +position = Vector2(-128, -3149) starting_gun = "smg" -starting_health = 100 +starting_health = 300 concious = false always_sees_player = true [node name="Camper2" parent="." instance=ExtResource("22_janyw")] -position = Vector2(33, -3085) +position = Vector2(-128, -3085) starting_gun = "smg" -starting_health = 100 +starting_health = 300 concious = false always_sees_player = true [node name="Camper3" parent="." instance=ExtResource("22_janyw")] position = Vector2(-6704, -6000) starting_gun = "smg" -starting_health = 100 +starting_health = 300 + +[node name="Camper4" parent="." instance=ExtResource("22_janyw")] +position = Vector2(-6704, -6000) +starting_gun = "smg" +starting_health = 300 +inaccuracy = 30 + +[node name="Camper5" parent="." instance=ExtResource("22_janyw")] +position = Vector2(-6704, -6000) +starting_health = 35 +reaction_time = 0.4 +inaccuracy = 30 + +[node name="Camper6" parent="." instance=ExtResource("22_janyw")] +position = Vector2(-6704, -6000) +starting_health = 35 +reaction_time = 0.4 +inaccuracy = 30 [node name="StaticBody2D" type="StaticBody2D" parent="."] position = Vector2(-1145.8125, -1537.0664) @@ -669,7 +760,7 @@ bus = &"Sound Effects" [connection signal="body_exited" from="GalactamartWorker/InteractArea" to="GalactamartWorker/InteractArea" method="_on_body_exited"] [connection signal="body_entered" from="Doctor/InteractArea" to="Doctor/InteractArea" method="_on_body_entered"] [connection signal="body_exited" from="Doctor/InteractArea" to="Doctor/InteractArea" method="_on_body_exited"] -[connection signal="body_entered" from="Doctor2/InteractArea" to="Doctor2/InteractArea" method="_on_body_entered"] -[connection signal="body_exited" from="Doctor2/InteractArea" to="Doctor2/InteractArea" method="_on_body_exited"] +[connection signal="body_entered" from="HospitalEscapeD2State1" to="Doctor2" method="_on_state_1_body_entered"] +[connection signal="body_entered" from="HospitalEscapeD2State2" to="Doctor2" method="_on_state_2_body_entered"] [connection signal="body_entered" from="ExitShip/InteractArea" to="ExitShip/InteractArea" method="_on_body_entered"] [connection signal="body_exited" from="ExitShip/InteractArea" to="ExitShip/InteractArea" method="_on_body_exited"] diff --git a/scenes/particles/blood.tscn b/scenes/particles/blood.tscn new file mode 100644 index 0000000..36e3d35 --- /dev/null +++ b/scenes/particles/blood.tscn @@ -0,0 +1,38 @@ +[gd_scene load_steps=6 format=3 uid="uid://c2s1tterykyu5"] + +[ext_resource type="Script" uid="uid://ck38qwl4qytnt" path="res://scripts/particle_group.gd" id="1_8186p"] +[ext_resource type="Texture2D" uid="uid://ccfofitk3x5jj" path="res://textures/particles/laser.png" id="2_a658j"] + +[sub_resource type="Curve" id="Curve_ipns3"] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.49242425, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] +point_count = 3 + +[sub_resource type="CurveTexture" id="CurveTexture_416m4"] +curve = SubResource("Curve_ipns3") + +[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_8186p"] +particle_flag_disable_z = true +angle_min = -720.0 +angle_max = 720.0 +spread = 180.0 +initial_velocity_min = 30.3 +initial_velocity_max = 260.81 +gravity = Vector3(0, 400, 0) +damping_min = 8.0 +damping_max = 14.000001 +scale_min = 0.29999998 +scale_max = 0.5 +alpha_curve = SubResource("CurveTexture_416m4") +collision_use_scale = true + +[node name="Blood" type="Node2D"] +script = ExtResource("1_8186p") + +[node name="GPUParticles2D" type="GPUParticles2D" parent="."] +emitting = false +amount = 24 +texture = ExtResource("2_a658j") +lifetime = 0.4 +one_shot = true +explosiveness = 1.0 +process_material = SubResource("ParticleProcessMaterial_8186p") diff --git a/scripts/character_ground.gd b/scripts/character_ground.gd index a2af003..8d9ec47 100644 --- a/scripts/character_ground.gd +++ b/scripts/character_ground.gd @@ -109,14 +109,22 @@ func _process(delta: float) -> void: if hit_target: if "health" in hit_target.get_parent(): - hit_target.get_parent().health -= 10 - - var bullet_impact = preload("res://scenes/particles/bullet_impact.tscn").instantiate() - bullet_impact.global_position = $HeldItem/Cast.get_collision_point() + hit_target.get_parent().health -= global.ground_guns[equipped_ground_gun].damage + + var blood = preload("res://scenes/particles/blood.tscn").instantiate() + blood.global_position = $HeldItem/Cast.get_collision_point() + + get_parent().add_child(blood) + + blood.play() + else: + var bullet_impact = preload("res://scenes/particles/bullet_impact.tscn").instantiate() + bullet_impact.global_position = $HeldItem/Cast.get_collision_point() + + get_parent().add_child(bullet_impact) - get_parent().add_child(bullet_impact) - bullet_impact.play() + bullet_impact.play() var bullet_trail = preload("res://scenes/particles/bullet_trail.tscn").instantiate() bullet_trail.global_position = $HeldItem/Sprite.global_position diff --git a/scripts/doctor.gd b/scripts/doctor.gd index f439481..a76117a 100644 --- a/scripts/doctor.gd +++ b/scripts/doctor.gd @@ -14,7 +14,7 @@ func _interact(player: Node2D) -> void: player.busy = true - await game.dialogue("Ready to leave?", "doctor", false) + await game.dialogue("Ready to leave?", "doctor_1", false) var option = await game.make_choice({ "yes": "Yes", @@ -22,20 +22,20 @@ func _interact(player: Node2D) -> void: }) if option == "yes": - await game.dialogue("Alrighty!", "doctor") + await game.dialogue("Alrighty!", "doctor_1") - await game.dialogue("We have your stuff back here, let me go grab it real quick...", "doctor") + await game.dialogue("We have your stuff back here, let me go grab it real quick...", "doctor_1") - await game.dialogue("Here's your bag.", "doctor") + await game.dialogue("Here's your bag.", "doctor_1") - await game.dialogue("Should have everything - tablet, ship keys, a pistol...", "doctor") + await game.dialogue("Should have everything - tablet, ship keys, a pistol...", "doctor_1") game.get_node("DistantGunshots1").play() await get_tree().create_timer(2).timeout - await game.dialogue("...the hell?", "doctor", false) + await game.dialogue("...the hell?", "doctor_1", false) await get_tree().create_timer(1.5).timeout @@ -45,11 +45,11 @@ func _interact(player: Node2D) -> void: await get_tree().create_timer(1).timeout - await game.dialogue("Oh, no.", "doctor", true) + await game.dialogue("Oh, no.", "doctor_1", true) await get_tree().create_timer(0.5).timeout - await game.dialogue("We need to leave. Now.", "doctor", true) + await game.dialogue("We need to leave. Now.", "doctor_1", true) await get_tree().create_timer(0.5).timeout @@ -58,7 +58,7 @@ func _interact(player: Node2D) -> void: player.busy = false - await game.dialogue("Follow me.", "doctor", false) + await game.dialogue("Follow me.", "doctor_1", false) await navigate_to(game.get_node("DoctorEscapeWaypoint1").position) @@ -66,15 +66,15 @@ func _interact(player: Node2D) -> void: player.busy = true - await game.dialogue("You good with that gun?", "doctor", true) + await game.dialogue("You good with that gun?", "doctor_1", true) var option_2 = await game.make_choice({ "yes": "Yes", "no": "No" }) - if option_2 == "yes": await game.dialogue("Good to know.", "doctor", true) - else: await game.dialogue("Well, you're still probably better than I would be.", "doctor", true) + if option_2 == "yes": await game.dialogue("Good to know.", "doctor_1", true) + else: await game.dialogue("Well, you're still probably better than I would be.", "doctor_1", true) global.stats.story_progress = 2 @@ -83,7 +83,7 @@ func _interact(player: Node2D) -> void: checkpoint_1() elif option == "no": - await game.dialogue("Well, I'm here whenever you need me.", "doctor") + await game.dialogue("Well, I'm here whenever you need me.", "doctor_1") player.get_node("Camera").enabled = true @@ -96,9 +96,11 @@ func _interact(player: Node2D) -> void: func checkpoint_1(): + $InteractArea.monitoring = false + var player = game.get_node("PlayerGround") - await game.dialogue("You should probably get it out.", "doctor", false) + await game.dialogue("You should probably get it out.", "doctor_1", false) player.busy = false @@ -110,7 +112,7 @@ func checkpoint_1(): game.get_node("UI/Control/UnholsterTutorial").visible = false - await game.dialogue("Let's go.", "doctor", false) + await game.dialogue("Let's go.", "doctor_1", false) game.checkpoint() @@ -118,7 +120,10 @@ func checkpoint_1(): while !game.get_node("DoctorEscapeWaypoint2/Area").get_overlapping_bodies().has(player): await get_tree().create_timer(0.2).timeout - await game.dialogue("RUN!", "doctor", false) + game.get_node("Dnbd").play() + game.get_node("IntrusionAlarm").stop() + + await game.dialogue("OH GOD!", "doctor_1", false) game.get_node("MedbayDoorLargeVertical").free() @@ -131,6 +136,9 @@ func checkpoint_1(): await get_tree().create_timer(0.06).timeout game.get_node("Camper2").firing = true + + await game.dialogue("RUN!", "doctor_1", false) + while health > 0: await get_tree().create_timer(0.2).timeout await game.end_dialogue() @@ -145,3 +153,4 @@ func checkpoint_1(): game.get_node("Camper2").concious = true game.get_node("Camper3").global_position = game.get_node("CamperSpawn1").global_position + game.get_node("Camper4").global_position = game.get_node("CamperSpawn2").global_position diff --git a/scripts/doctor_2.gd b/scripts/doctor_2.gd new file mode 100644 index 0000000..a83f6d6 --- /dev/null +++ b/scripts/doctor_2.gd @@ -0,0 +1,138 @@ +extends "res://scripts/character_ground.gd" + +@onready var game = get_parent() + +func _ready() -> void: + equipped_ground_gun = "docgun" + + super() + + health = 999 + +func _on_state_1_body_entered(body: Node2D) -> void: + if body != game.get_node("PlayerGround"): return + + game.get_node("HospitalEscapeD2State1").monitoring = false + + print("test") + + vertical_movement = -1 + horizontial_movement = -1 + + while global_position.y > -1376.0: await get_tree().create_timer(0.1).timeout + + vertical_movement = 0 + horizontial_movement = 0 + + await game.dialogue("Get over here!", "doctor_2", false) + +func _on_state_2_body_entered(body: Node2D) -> void: + if body != game.get_node("PlayerGround"): return + + game.get_node("HospitalEscapeD2State2").monitoring = false + + firing = true + + while game.get_node("Camper1").health > 0: + $HeldItem.look_at(game.get_node("Camper1").global_position) + + await get_tree().create_timer(0.2).timeout + + while game.get_node("Camper2").health > 0: + $HeldItem.look_at(game.get_node("Camper2").global_position) + + await get_tree().create_timer(0.2).timeout + + while game.get_node("Camper4").health > 0: + $HeldItem.look_at(game.get_node("Camper4").global_position) + + await get_tree().create_timer(0.2).timeout + + firing = false + + await get_tree().create_timer(0.666).timeout + + set_ground_gun(null) + + game.get_node("Dnbd").playing = false + game.get_node("IntrusionAlarm").play() + + await game.dialogue("You need to go, now.", "doctor_2", true) + + await navigate_to(game.get_node("Doctor2DoorWaypoint").global_position) + + var player = game.get_node("PlayerGround") + + if (global_position - player.global_position).length() > 200: + await game.dialogue("Come.", "doctor_2", false) + + while (global_position - player.global_position).length() > 200: await get_tree().create_timer(0.25).timeout + + player.busy = true + + await game.dialogue("Is the other doctor dead?", "doctor_2", false) + + var option = await game.make_choice({ + "yes": "Yes", + "no": "No" + }) + + if option == "yes": + await game.dialogue("Shit. I liked hating him.", "doctor_2", true) + else: + await game.dialogue("Damnit. Was hoping he was.", "doctor_2", true) + + await game.dialogue("Anyways, there's probably some of those bastards in there, so be careful.", "doctor_2", true) + + await game.dialogue("Your ship is on the first row, furthest to the left.", "doctor_2", false) + + var option_2 = null + + while option_2 != "got_it": + option_2 = await game.make_choice({ + "whoarethey": "Who are they?", + "whataboutyou": "What about you?", + "got_it": "Got it", + }) + + if option_2 == "whoarethey": + await game.dialogue("Who are these people, anyways?", "player", true) + + await game.dialogue("You don't know?... oh wait, that makes sense.", "doctor_2", true) + await game.dialogue("Those guys are from HADA, the Humble Anarchist's Defense Alliance.", "doctor_2", true) + await game.dialogue("Nasty people. They do a lot of things...", "doctor_2", true) + await game.dialogue("but they also iketo try and destroy anything they see as a threat to their ideals.", "doctor_2", true) + await game.dialogue("They almost never fully succeed, but that doesn't mean they don't leave a mark.", "doctor_2", true) + elif option_2 == "whataboutyou": + await game.dialogue("What are you going to do?", "player", true) + + await game.dialogue("I will be camping it out.", "doctor_2", true) + await game.dialogue("I live here. If I left all my stuff behind like this, I would hate myself.", "doctor_2", true) + await game.dialogue("That's not something you should worry about excessively, though. You don't even know me.", "doctor_2", true) + + game.save_game() + + checkpoint_2() + +func checkpoint_2(): + game.get_node("Dnbd").playing = false + game.get_node("IntrusionAlarm").play() + + var player = game.get_node("PlayerGround") + + player.busy = true + + await game.dialogue("I wish you luck.", "doctor_2", true) + + game.get_node("Dnbd").playing = true + + player.health = 100 + + game.get_node("Camper5").global_position = game.get_node("CamperSpawn3").global_position + game.get_node("Camper6").global_position = game.get_node("CamperSpawn4").global_position + + player.busy = false + + game.get_node("Doctor2DoorToOpen").set_open(true) + + global.stats.story_progress = 3 diff --git a/scripts/doctor_2.gd.uid b/scripts/doctor_2.gd.uid new file mode 100644 index 0000000..ec71ecf --- /dev/null +++ b/scripts/doctor_2.gd.uid @@ -0,0 +1 @@ +uid://cytses4dvcif2 diff --git a/scripts/door_medium_horizontial.gd b/scripts/door_medium_horizontial.gd new file mode 100644 index 0000000..3e2fb2e --- /dev/null +++ b/scripts/door_medium_horizontial.gd @@ -0,0 +1,18 @@ +extends StaticBody2D + +@export var open: bool = false + +func set_open(value: bool) -> void: + open = value + if open: + $CollisionShape.disabled = true + $Sprite.animation = "open" + + else: + $CollisionShape.disabled = false + $Sprite.animation = "default" + + $Sprite.play() + +func _ready() -> void: + set_open(open) diff --git a/scripts/door_medium_horizontial.gd.uid b/scripts/door_medium_horizontial.gd.uid new file mode 100644 index 0000000..88d7a67 --- /dev/null +++ b/scripts/door_medium_horizontial.gd.uid @@ -0,0 +1 @@ +uid://b88ykyte6oi3i diff --git a/scripts/enemy_ground.gd b/scripts/enemy_ground.gd index 09d9636..c376e8d 100644 --- a/scripts/enemy_ground.gd +++ b/scripts/enemy_ground.gd @@ -3,8 +3,6 @@ extends "res://scripts/character_ground.gd" var last_aim_direction = Vector2(0, 0) var alerted = false -var inaccuracy = 15 - var reaction_halve_distance = 720 var reaction_timer = 0 @@ -39,6 +37,8 @@ var game = null ## The time it takes for an enemy to start shooting / notice the player. @export var reaction_time: float = 0.35 +@export var inaccuracy: int = 15 + func _ready() -> void: super() @@ -133,6 +133,8 @@ func _process(delta: float) -> void: last_seen_player_position = player.global_position elif ai_state == AI_STATE_CHASE_LAST_SEEN: + firing = false + if $Navagent.is_navigation_finished(): last_seen_player_position = null ai_mode = AI_MODE_IDLE diff --git a/scripts/game.gd b/scripts/game.gd index c0ce8ac..0dc79e7 100644 --- a/scripts/game.gd +++ b/scripts/game.gd @@ -11,7 +11,7 @@ var enemy_scene = preload("res://scenes/enemy.tscn") var star_scene = preload("res://scenes/star.tscn") @onready var spawn_points = { - "SpaceStation1": $Orbits/SpaceStation1/SpaceStation1/ExitPoint + "space_station_1": $Orbits/SpaceStation1/SpaceStation1/ExitPoint } @onready var navigation_points = [ @@ -50,6 +50,8 @@ func save_game() -> void: "y": $Player.global_position.y } + global.stats.location = "space" + global.save_game() await get_tree().create_timer(2).timeout @@ -83,10 +85,6 @@ func _ready() -> void: LimboConsole.register_command(summon_enemy, "summon_enemy", "Summons an enemy.") var events = InputMap.action_get_events("forward") - - if (global.stats.location != "space") and (spawn_points.has(global.stats.location)): - $Player.global_position = spawn_points[global.stats.location].global_position - $Player.rotation = spawn_points[global.stats.location].rotation for n in navigation_points: var navigation_item = preload("res://scenes/navigation_item.tscn").instantiate() @@ -125,21 +123,35 @@ func _ready() -> void: i += 1 - if global.stats.position: + if (global.stats.location != "space") and (spawn_points.has(global.stats.location)): + $Player.global_position = spawn_points[global.stats.location].global_position + $Player.rotation = spawn_points[global.stats.location].rotation + elif global.stats.position: $Player.global_position.x = global.stats.position.x $Player.global_position.y = global.stats.position.y global.stats.position = null - else: + + global.stats.location = "space" + + if global.stats.story_progress < 4: global.stats.story_progress = 4 + + if global.stats.loaded: save_game() + else: + global.stats.loaded = true func _process(delta: float) -> void: if get_tree().paused: return if global.stats.navigation_goal: - if not global.stats.navigation_goal.point: - global.stats.navigation_goal = null + if !global.stats.navigation_goal.point || (typeof(global.stats.navigation_goal.point) == TYPE_STRING): + if global.stats.navigation_goal.id: + for n in navigation_points: + if n.id == global.stats.navigation_goal.id: + global.stats.navigation_goal.point = n.point + break else: if !$Navring.has_node("NavigationMarker"): var navigation_marker = preload("res://scenes/navigation_marker.tscn").instantiate() @@ -161,9 +173,10 @@ func _process(delta: float) -> void: $UI/Control/Navpanel/Navigation/Hyperboost.visible = true - var goal_distance = (global.stats.navigation_goal.point.position - $Player.position).length() + if global.stats.navigation_goal.point and (typeof(global.stats.navigation_goal.point) != TYPE_STRING): + var goal_distance = (global.stats.navigation_goal.point.position - $Player.position).length() - $UI/Control/Navpanel/Navigation/Destination.text = global.stats.navigation_goal.name + " (" + str(floori(goal_distance)) + "u)" + $UI/Control/Navpanel/Navigation/Destination.text = global.stats.navigation_goal.name + " (" + str(floori(goal_distance)) + "u)" else: if $Navring.has_node("NavigationMarker"): $Navring.get_node("NavigationMarker").queue_free() diff --git a/scripts/game_ground.gd b/scripts/game_ground.gd index e29d18b..3b0b392 100644 --- a/scripts/game_ground.gd +++ b/scripts/game_ground.gd @@ -35,9 +35,6 @@ func save_game() -> void: func checkpoint() -> void: var packed_scene = PackedScene.new() packed_scene.pack(get_tree().get_current_scene()) - - if global.checkpoint: - global.checkpoint.free() global.checkpoint = packed_scene @@ -65,10 +62,16 @@ func _ready() -> void: location_scene.free() if global.stats.position: + print("AAA ", global.stats.position) $PlayerGround.global_position.x = global.stats.position.x $PlayerGround.global_position.y = global.stats.position.y global.stats.position = null + + if global.stats.loaded: + save_game() + else: + global.stats.loaded = true func _process(delta: float) -> void: if current_interaction_area: @@ -102,7 +105,7 @@ func dialogue(text: String, type: String = "generic", allow_input: bool = true) $Dialogue.play() - #await get_tree().create_timer(speed).timeout + await get_tree().create_timer(speed).timeout i += 1 diff --git a/scripts/global.gd b/scripts/global.gd index 4a677e7..550d717 100644 --- a/scripts/global.gd +++ b/scripts/global.gd @@ -36,6 +36,13 @@ var ground_guns = { "magazine_size": 12, "fire_rate": 0.3 }, + "docgun": { + "name": "Docgun", + "type": "kinetic", + "damage": 150, + "magazine_size": 12, + "fire_rate": 0.25 + }, "smg": { "name": "Ripper", "type": "energy", diff --git a/scripts/player_ground.gd b/scripts/player_ground.gd index e7b9390..6c87a62 100644 --- a/scripts/player_ground.gd +++ b/scripts/player_ground.gd @@ -46,12 +46,17 @@ func _process(delta: float) -> void: $HeldItem/Line.visible = false if Input.is_action_just_pressed("toggle_holster"): - global.stats.gun_holstered = !global.stats.gun_holstered - - if global.stats.gun_holstered: - set_ground_gun(null) + if global.stats.equipped_ground_gun: + global.stats.gun_holstered = !global.stats.gun_holstered + + if global.stats.gun_holstered: + set_ground_gun(null) + else: + set_ground_gun(global.stats.equipped_ground_gun) else: - set_ground_gun(global.stats.equipped_ground_gun) + global.stats.gun_holstered = true + + set_ground_gun(null) firing = Input.is_action_pressed("fire") diff --git a/scripts/story_handler_1.gd b/scripts/story_handler_1.gd index 6e39c80..fa7c430 100644 --- a/scripts/story_handler_1.gd +++ b/scripts/story_handler_1.gd @@ -225,9 +225,20 @@ func _ground_ready() -> void: game.get_node("Doctor/InteractArea").monitoring = false - player.global_position = game.get_node("Checkpoint1PlayerSpawn").global_position + #player.global_position = game.get_node("Checkpoint1PlayerSpawn").global_position game.get_node("Doctor").global_position = game.get_node("Checkpoint1DoctorSpawn").global_position game.get_node("Doctor").checkpoint_1() - else: - game.save_game() + elif global.stats.story_progress == 3: + game.get_node("Uglyburger").stop() + + game.get_node("HospitalEscapeD2State1").monitoring = false + game.get_node("HospitalEscapeD2State2").monitoring = false + + game.get_node("Map").modulate = Color(0.5, 0.35, 0.35) + + game.get_node("Doctor2").global_position = game.get_node("Doctor2DoorWaypoint").global_position + + game.get_node("Doctor2").firing = false + + game.get_node("Doctor2").checkpoint_2() diff --git a/scripts/title.gd b/scripts/title.gd index ecf25e3..25e3f8f 100644 --- a/scripts/title.gd +++ b/scripts/title.gd @@ -273,6 +273,8 @@ func _on_load_game_pressed() -> void: await global.load_game() + global.stats.loaded = false + if global.stats.location == "space": get_tree().change_scene_to_file("res://scenes/game.tscn") else: diff --git a/sounds/music/dnbd.mp3 b/sounds/music/dnbd.mp3 new file mode 100644 index 0000000..ce83e57 Binary files /dev/null and b/sounds/music/dnbd.mp3 differ diff --git a/sounds/music/dnbd.mp3.import b/sounds/music/dnbd.mp3.import new file mode 100644 index 0000000..a3bdb10 --- /dev/null +++ b/sounds/music/dnbd.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://cqco8ncle0u0j" +path="res://.godot/imported/dnbd.mp3-c371aef019a254e92edc32d9620186a2.mp3str" + +[deps] + +source_file="res://sounds/music/dnbd.mp3" +dest_files=["res://.godot/imported/dnbd.mp3-c371aef019a254e92edc32d9620186a2.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/sounds/music/dnbd_sudden.mp3 b/sounds/music/dnbd_sudden.mp3 new file mode 100644 index 0000000..2cfe459 Binary files /dev/null and b/sounds/music/dnbd_sudden.mp3 differ diff --git a/sounds/music/dnbd_sudden.mp3.import b/sounds/music/dnbd_sudden.mp3.import new file mode 100644 index 0000000..d799c8e --- /dev/null +++ b/sounds/music/dnbd_sudden.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://7cvp5b3mq1tn" +path="res://.godot/imported/dnbd_sudden.mp3-154358d4b626b7474adf08b4244e8089.mp3str" + +[deps] + +source_file="res://sounds/music/dnbd_sudden.mp3" +dest_files=["res://.godot/imported/dnbd_sudden.mp3-154358d4b626b7474adf08b4244e8089.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/textures/Sprite-0001.aseprite b/textures/Sprite-0001.aseprite new file mode 100644 index 0000000..a4ad537 Binary files /dev/null and b/textures/Sprite-0001.aseprite differ diff --git a/textures/bag.png b/textures/bag.png new file mode 100644 index 0000000..bd6d4a0 Binary files /dev/null and b/textures/bag.png differ diff --git a/textures/bag.png.import b/textures/bag.png.import new file mode 100644 index 0000000..177135a --- /dev/null +++ b/textures/bag.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://oh8y7lbiprs4" +path="res://.godot/imported/bag.png-1d3569746a0afa7a50020e78aeb3fcf6.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://textures/bag.png" +dest_files=["res://.godot/imported/bag.png-1d3569746a0afa7a50020e78aeb3fcf6.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/textures/docgun.png b/textures/docgun.png new file mode 100644 index 0000000..5aed2ab Binary files /dev/null and b/textures/docgun.png differ diff --git a/textures/docgun.png.import b/textures/docgun.png.import new file mode 100644 index 0000000..a01fbce --- /dev/null +++ b/textures/docgun.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://kg37aadtiumw" +path="res://.godot/imported/docgun.png-7020161270f57741a5c61a0720a68af0.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://textures/docgun.png" +dest_files=["res://.godot/imported/docgun.png-7020161270f57741a5c61a0720a68af0.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/textures/door_medium_horziontial.aseprite b/textures/door_medium_horziontial.aseprite new file mode 100644 index 0000000..a4ad537 Binary files /dev/null and b/textures/door_medium_horziontial.aseprite differ diff --git a/textures/door_medium_horziontial.png b/textures/door_medium_horziontial.png new file mode 100644 index 0000000..6c3adb2 Binary files /dev/null and b/textures/door_medium_horziontial.png differ diff --git a/textures/door_medium_horziontial.png.import b/textures/door_medium_horziontial.png.import new file mode 100644 index 0000000..436a467 --- /dev/null +++ b/textures/door_medium_horziontial.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://djmlhid6f4xwi" +path="res://.godot/imported/door_medium_horziontial.png-60b5ecd0bd81d95adb1ce6c5aa367884.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://textures/door_medium_horziontial.png" +dest_files=["res://.godot/imported/door_medium_horziontial.png-60b5ecd0bd81d95adb1ce6c5aa367884.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1