From 1d75036a317c1af1366b6e34b269b19c7c0a9aec Mon Sep 17 00:00:00 2001 From: Derek Date: Tue, 18 Feb 2025 22:58:01 -0600 Subject: [PATCH] added wall running and jumping --- assets/bullet_cam.tscn | 33 ++++++- assets/player.tscn | 19 ++++- project.godot | 2 +- scenes/enemy_working_scene.tscn | 147 +++++++++++++++++++++++++++++++- scenes/test_level_2v2.tscn | 6 +- scripts/bullet_cam.gd | 33 +++---- scripts/player.gd | 46 ++++++++-- 7 files changed, 251 insertions(+), 35 deletions(-) diff --git a/assets/bullet_cam.tscn b/assets/bullet_cam.tscn index c121d2a..46ddb2d 100644 --- a/assets/bullet_cam.tscn +++ b/assets/bullet_cam.tscn @@ -1,9 +1,35 @@ -[gd_scene load_steps=13 format=4 uid="uid://neb8fxkrade0"] +[gd_scene load_steps=15 format=4 uid="uid://neb8fxkrade0"] [ext_resource type="Script" path="res://scripts/bullet_cam.gd" id="1_uvdg3"] +[ext_resource type="Shader" path="res://assets/crtTest.gdshader" id="2_6gutm"] [ext_resource type="AudioStream" uid="uid://dqj4cx05f25jj" path="res://assets/Audio/punch-body-hard-SBA-300156881.wav" id="3_t6e3w"] [sub_resource type="CameraAttributesPractical" id="CameraAttributesPractical_w2xv5"] +auto_exposure_enabled = true + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_p1llk"] +shader = ExtResource("2_6gutm") +shader_parameter/overlay = true +shader_parameter/scanlines_opacity = 0.4 +shader_parameter/scanlines_width = 0.25 +shader_parameter/grille_opacity = 0.3 +shader_parameter/resolution = Vector2(640, 480) +shader_parameter/pixelate = false +shader_parameter/roll = true +shader_parameter/roll_speed = 8.0 +shader_parameter/roll_size = 15.0 +shader_parameter/roll_variation = 1.8 +shader_parameter/distort_intensity = 0.0 +shader_parameter/noise_opacity = 0.0 +shader_parameter/noise_speed = 5.0 +shader_parameter/static_noise_intensity = 0.0 +shader_parameter/aberration = 4.75e-08 +shader_parameter/brightness = 1.56 +shader_parameter/discolor = true +shader_parameter/warp_amount = 0.0 +shader_parameter/clip_warp = true +shader_parameter/vignette_intensity = 5.445 +shader_parameter/vignette_opacity = 0.094 [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_mfpbf"] resource_name = "bullet" @@ -101,6 +127,11 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1.35947) attributes = SubResource("CameraAttributesPractical_w2xv5") fov = 150.0 +[node name="ColorRect" type="ColorRect" parent="Camera3D"] +material = SubResource("ShaderMaterial_p1llk") +offset_right = 3840.0 +offset_bottom = 2160.0 + [node name="Cylinder" type="MeshInstance3D" parent="."] transform = Transform3D(-1, -1.50996e-07, 6.60024e-15, 0, -4.37114e-08, -1, 1.50996e-07, -1, 4.37114e-08, 1.46364e-07, 0, -0.113697) cast_shadow = 0 diff --git a/assets/player.tscn b/assets/player.tscn index 4743db3..32f3982 100644 --- a/assets/player.tscn +++ b/assets/player.tscn @@ -220,7 +220,7 @@ transform = Transform3D(1, 0, 0, 0, 0.992332, 0.123601, 0, -0.123601, 0.992332, [node name="BulletRay" type="RayCast3D" parent="Head/Recoil/Camera3D"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.487738) target_position = Vector3(0, 0, -200) -collision_mask = 233 +collision_mask = 105 collide_with_areas = true script = ExtResource("10_ektr6") @@ -313,9 +313,22 @@ libraries = { "": SubResource("AnimationLibrary_d0x8a") } -[node name="velocity_ray" type="RayCast3D" parent="."] -transform = Transform3D(1, -2.21121e-11, 5.69206e-32, 2.21121e-11, 1, 0, -5.69206e-32, 1.25837e-42, 1, 0.000168126, -1.01843, -0.00105944) +[node name="wall_ray1" type="RayCast3D" parent="."] +transform = Transform3D(1, -4.26326e-11, -5.82077e-11, 3.6664e-11, 1, 0, 0, 0, 1, 8.1824e-07, -0.00495505, -5.15778e-06) +target_position = Vector3(-1, 0, 0) + +[node name="wall_ray2" type="RayCast3D" parent="."] +transform = Transform3D(1, -4.26326e-11, -5.82077e-11, 3.6664e-11, 1, 0, 0, 0, 1, 8.1824e-07, -0.00495505, -5.15778e-06) +target_position = Vector3(1, 0, 0) + +[node name="wall_ray3" type="RayCast3D" parent="."] +transform = Transform3D(1, -4.26326e-11, -5.82077e-11, 3.6664e-11, 1, 0, 0, 0, 1, 8.1824e-07, -0.00495505, -5.15778e-06) +target_position = Vector3(0, 0, 1) + +[node name="WallJumpTimer" type="Timer" parent="."] +one_shot = true [connection signal="tree_entered" from="." to="." method="_on_tree_entered"] [connection signal="body_entered" from="pick_up_detection" to="." method="_on_pick_up_detection_body_entered"] [connection signal="body_entered" from="pick_up_magnet" to="." method="_on_pick_up_magnet_body_entered"] +[connection signal="timeout" from="WallJumpTimer" to="." method="_on_wall_jump_timer_timeout"] diff --git a/project.godot b/project.godot index a2ae7cf..da21824 100644 --- a/project.godot +++ b/project.godot @@ -11,7 +11,7 @@ config_version=5 [application] config/name="First Person Test" -run/main_scene="res://scenes/test_level_2v2.tscn" +run/main_scene="res://scenes/enemy_working_scene.tscn" config/features=PackedStringArray("4.3", "Forward Plus") config/icon="res://icon.svg" diff --git a/scenes/enemy_working_scene.tscn b/scenes/enemy_working_scene.tscn index 313ab53..951ecbb 100644 --- a/scenes/enemy_working_scene.tscn +++ b/scenes/enemy_working_scene.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=22 format=3 uid="uid://dsnddbrlqkav2"] +[gd_scene load_steps=24 format=3 uid="uid://dsnddbrlqkav2"] [ext_resource type="Script" path="res://scripts/LevelManager.gd" id="1_laua1"] [ext_resource type="PackedScene" uid="uid://brl0bsqjl5dg3" path="res://assets/mac_10.tscn" id="2_poauc"] @@ -16,6 +16,8 @@ [ext_resource type="PackedScene" uid="uid://cgo4qyul7ix5p" path="res://assets/ladder.tscn" id="15_bsva3"] [ext_resource type="PackedScene" uid="uid://cdpxctwwi12j" path="res://assets/ladder_collision_check.tscn" id="15_vb271"] [ext_resource type="PackedScene" uid="uid://bj1y0fbjtul4a" path="res://post_processing.tscn" id="16_p7sg0"] +[ext_resource type="PackedScene" uid="uid://20csd6dmwj4y" path="res://assets/jump_platform.tscn" id="17_8q5j4"] +[ext_resource type="PackedScene" uid="uid://d4suhr3allsj" path="res://assets/revolver2_pickup.tscn" id="18_uhe6c"] [sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_w6vpl"] sky_top_color = Color(0.623488, 0.812575, 0.900791, 1) @@ -32,23 +34,30 @@ tonemap_mode = 2 glow_enabled = true [sub_resource type="NavigationMesh" id="NavigationMesh_8aw3d"] -vertices = PackedVector3Array(-24.5, -4.637, -268.188, -24.5, -4.637, -219.188, 24.5, -4.637, -219.188, 24.5, -4.637, -268.188, -24.5, -30.137, -227.688, -24.5, -30.137, -178.438, 24.5, -30.137, -178.438, 24.5, -30.137, -227.688, -24.5, -71.387, -164.688, -24.5, -71.387, -115.438, 24.5, -71.387, -115.438, 24.5, -71.387, -164.688, -24.5, -71.387, -96.188, -24.5, -71.387, -46.938, 24.5, -71.387, -46.938, 24.5, -71.387, -96.188, -13, 0.112999, -36.188, -12.25, 0.112999, -36.438, -12.25, 0.112999, -41.688, -13.5, 0.112999, -34.938, -13, 0.112999, -36.188, -12.25, 0.112999, -41.688, -19.25, 0.112999, -28.438, -18.5, 0.112999, -28.438, -20, 0.112999, -27.188, -19.25, 0.112999, -28.438, -12.25, 0.112999, -41.688, -37, 0.112999, -41.688, -37, 0.112999, -27.188, -12.25, 0.112999, -41.688, -12.25, 0.112999, -36.438, -10, 0.112999, -35.188, 7, 0.112999, -32.688, 8.5, 0.112999, -33.688, 8.5, 0.112999, -41.688, -12.25, 0.112999, -41.688, -10, 0.112999, -35.188, -3.25, 0.112999, -29.438, -3.25, 0.112999, -29.438, 7.75, 0.112999, -31.188, 7, 0.112999, -31.688, -3.25, 0.112999, -29.438, 7, 0.112999, -31.688, 7, 0.112999, -32.688, 36.5, 0.112999, -25.188, 36.75, 0.112999, -23.938, 37, 0.112999, -23.938, 37, 0.112999, -41.688, 8.5, 0.112999, -41.688, 8.5, 0.112999, -33.688, 19.25, 0.112999, -25.188, 36.5, 0.112999, -25.188, 37, 0.112999, -41.688, -11.5, 0.112999, -22.938, -9, 0.112999, -25.688, -6.5, 0.112999, -29.188, -12.25, 0.112999, -33.438, -18.5, 0.112999, -28.438, -12.25, 0.112999, -33.438, -13.5, 0.112999, -34.938, -18.5, 0.112999, -28.438, -7.5, 4.863, -25.438, -6.75, 4.863, -26.688, -7.5, 4.863, -27.188, -10.25, 4.863, -24.438, -8.75, 4.863, -23.938, -17.75, 4.863, -27.688, -11.25, 4.863, -22.938, -10.25, 4.863, -24.438, -7.5, 4.863, -28.188, -6.5, 4.863, -28.938, -13, 4.863, -34.188, -10.25, 4.863, -24.438, -7.5, 4.863, -27.188, -7.5, 4.863, -28.188, -13, 4.863, -34.188, -17.75, 4.863, -28.188, -17.75, 4.863, -27.688, -7.5, 9.863, -25.438, -6.75, 9.863, -26.688, -7.5, 9.863, -27.188, -10.25, 9.863, -24.438, -8.75, 9.863, -23.938, -7.5, 9.863, -28.188, -6.5, 9.863, -28.938, -10.5, 9.863, -32.438, -15.75, 9.863, -26.438, -11.25, 9.863, -22.938, -10.25, 9.863, -24.438, -10.25, 9.863, -24.438, -7.5, 9.863, -27.188, -7.5, 9.863, -28.188, -10.5, 9.863, -32.438, -11.25, 9.863, -32.438, -15.75, 9.863, -26.438, 37, 0.112999, -23.938, 36.75, 0.112999, -23.938, 36.5, 0.112999, -22.938, 37, 0.112999, 37.062, -28, 0.112999, 4.81201, -29, 0.112999, 4.06201, -37, 0.112999, 4.06201, -37, 0.112999, 37.062, 7.75, 0.112999, -31.188, -3.25, 0.112999, -29.438, -3.25, 0.112999, -28.688, -3.25, 0.112999, -28.688, -4.75, 0.112999, -27.688, -10.5, 0.112999, -19.938, 20.25, 0.112999, -21.438, 7.75, 0.112999, -31.188, -12.5, 0.112999, -20.438, -18, 0.112999, -24.938, -26, 0.112999, -15.938, 36.5, 0.112999, -22.938, 22, 0.112999, -22.938, 22, 0.112999, -22.188, 36.5, 0.112999, -22.938, 22, 0.112999, -22.188, 21.25, 0.112999, -21.438, -10.5, 0.112999, -19.938, -12.5, 0.112999, -20.438, -26, 0.112999, -15.938, -26.75, 0.112999, 4.56201, -28, 0.112999, 4.81201, -37, 0.112999, 37.062, -10.5, 0.112999, -19.938, -26, 0.112999, -15.938, -26.75, 0.112999, 4.56201, 21.25, 0.112999, -21.438, 20.25, 0.112999, -21.438, 37, 0.112999, 37.062, 36.5, 0.112999, -22.938, 21.25, 0.112999, -21.438, -26.75, 0.112999, 4.56201, -37, 0.112999, 37.062, -5.5, 11.363, -28.938, -5.5, 11.113, -28.438, -4.5, 11.363, -28.938, -4.75, 11.363, -29.688, -5.25, 11.363, -29.688, -6.25, 11.113, -27.938, -6.25, 11.113, -27.438, -5.75, 11.113, -27.688, -5.75, 11.113, -28.188, -37, 0.112999, -13.188, -28.5, 0.112999, -13.188, -28.25, 0.112999, -16.188, -26.25, 0.112999, -16.438, -26, 0.112999, -15.938, -18, 0.112999, -24.938, -20, 0.112999, -26.438, -28.25, 0.112999, -16.188, -20, 0.112999, -27.188, -37, 0.112999, -27.188, -37, 0.112999, -13.188, -26.25, 0.112999, -16.438, -20, 0.112999, -26.438, -20, 0.112999, -27.188, -28.25, 0.112999, -16.188, 20.25, 5.613, -22.688, 20.75, 5.613, -22.688, 20.75, 5.613, -23.938, 18.75, 5.613, -24.188, 18.75, 5.613, -24.188, 20.75, 5.613, -23.938, 35.75, 5.613, -23.938, -10.25, 11.113, -21.938, -10.25, 11.113, -22.438, -11, 11.363, -21.688, -11.25, 11.363, -20.938, -12.5, 11.363, -22.188, -11.25, 11.363, -20.938, -11, 11.363, -21.688, -29, 0.112999, 4.06201, -28.5, 0.112999, -13.188, -37, 0.112999, -13.188, -37, 0.112999, 4.06201) -polygons = [PackedInt32Array(3, 2, 0), PackedInt32Array(0, 2, 1), PackedInt32Array(7, 6, 4), PackedInt32Array(4, 6, 5), PackedInt32Array(11, 10, 8), PackedInt32Array(8, 10, 9), PackedInt32Array(15, 14, 12), PackedInt32Array(12, 14, 13), PackedInt32Array(18, 17, 16), PackedInt32Array(20, 19, 21), PackedInt32Array(21, 19, 23), PackedInt32Array(21, 23, 22), PackedInt32Array(25, 24, 26), PackedInt32Array(26, 24, 28), PackedInt32Array(26, 28, 27), PackedInt32Array(31, 30, 29), PackedInt32Array(33, 32, 34), PackedInt32Array(34, 32, 37), PackedInt32Array(34, 37, 36), PackedInt32Array(34, 36, 35), PackedInt32Array(40, 39, 38), PackedInt32Array(43, 42, 41), PackedInt32Array(45, 44, 46), PackedInt32Array(46, 44, 47), PackedInt32Array(49, 48, 50), PackedInt32Array(50, 48, 51), PackedInt32Array(51, 48, 52), PackedInt32Array(54, 53, 55), PackedInt32Array(55, 53, 56), PackedInt32Array(56, 53, 57), PackedInt32Array(60, 59, 58), PackedInt32Array(62, 61, 63), PackedInt32Array(63, 61, 65), PackedInt32Array(63, 65, 64), PackedInt32Array(68, 67, 66), PackedInt32Array(71, 70, 69), PackedInt32Array(73, 72, 74), PackedInt32Array(74, 72, 75), PackedInt32Array(75, 72, 76), PackedInt32Array(76, 72, 77), PackedInt32Array(79, 78, 80), PackedInt32Array(80, 78, 82), PackedInt32Array(80, 82, 81), PackedInt32Array(85, 84, 83), PackedInt32Array(86, 88, 87), PackedInt32Array(90, 89, 91), PackedInt32Array(91, 89, 92), PackedInt32Array(92, 89, 93), PackedInt32Array(93, 89, 94), PackedInt32Array(96, 95, 97), PackedInt32Array(97, 95, 98), PackedInt32Array(100, 99, 101), PackedInt32Array(101, 99, 102), PackedInt32Array(105, 104, 103), PackedInt32Array(107, 106, 108), PackedInt32Array(108, 106, 110), PackedInt32Array(108, 110, 109), PackedInt32Array(113, 112, 111), PackedInt32Array(116, 115, 114), PackedInt32Array(117, 119, 118), PackedInt32Array(122, 121, 120), PackedInt32Array(125, 124, 123), PackedInt32Array(130, 129, 126), PackedInt32Array(126, 129, 127), PackedInt32Array(127, 129, 128), PackedInt32Array(132, 131, 133), PackedInt32Array(133, 131, 134), PackedInt32Array(134, 131, 135), PackedInt32Array(140, 139, 136), PackedInt32Array(136, 139, 138), PackedInt32Array(136, 138, 137), PackedInt32Array(144, 143, 141), PackedInt32Array(141, 143, 142), PackedInt32Array(147, 146, 145), PackedInt32Array(148, 151, 149), PackedInt32Array(149, 151, 150), PackedInt32Array(155, 154, 152), PackedInt32Array(152, 154, 153), PackedInt32Array(157, 156, 158), PackedInt32Array(158, 156, 159), PackedInt32Array(161, 160, 162), PackedInt32Array(162, 160, 163), PackedInt32Array(166, 165, 164), PackedInt32Array(168, 167, 169), PackedInt32Array(169, 167, 170), PackedInt32Array(172, 171, 173), PackedInt32Array(177, 176, 174), PackedInt32Array(174, 176, 175)] +vertices = PackedVector3Array(-24.5843, -4.637, -268.188, -24.5843, -4.637, -219.188, 24.6657, -4.637, -219.188, 24.6657, -4.637, -268.188, -24.5843, -30.137, -227.688, -24.5843, -30.137, -178.438, 24.6657, -30.137, -178.438, 24.6657, -30.137, -227.688, -24.5843, -71.387, -164.688, -24.5843, -71.387, -115.438, 24.6657, -71.387, -115.438, 24.6657, -71.387, -164.688, -24.5843, -71.387, -96.188, -24.5843, -71.387, -46.938, 24.6657, -71.387, -46.938, 24.6657, -71.387, -96.188, -13.3343, 0.112999, -35.688, -12.0843, 0.112999, -36.438, -12.0843, 0.112999, -41.688, -18.5843, 0.112999, -28.438, -13.3343, 0.112999, -34.688, -19.5843, 0.112999, -28.188, -37.0843, 0.112999, -41.688, -37.0843, 0.112999, -26.938, -20.0843, 0.112999, -26.938, 7.16568, 0.112999, -32.938, 8.41568, 0.112999, -33.688, 8.41568, 0.112999, -41.688, -5.83432, 0.112999, -31.938, -3.33432, 0.112999, -29.438, 8.41568, 0.112999, -30.688, 7.16568, 0.112999, -31.688, 36.4157, 0.112999, -25.188, 36.6657, 0.112999, -24.188, 37.1657, 0.112999, -24.188, 37.1657, 0.112999, -41.688, 19.4157, 0.112999, -25.188, -11.5843, 0.112999, -22.938, -10.5843, 0.112999, -23.688, -6.58432, 0.112999, -29.188, -17.5843, 4.863, -28.438, -17.5843, 4.863, -27.688, -16.8343, 4.863, -26.938, -7.33432, 4.863, -28.188, -6.58432, 4.863, -28.938, -7.58432, 4.863, -30.188, -10.3343, 4.863, -24.438, -8.83432, 4.863, -23.938, -8.08432, 4.863, -24.688, -7.33432, 4.863, -26.938, -6.83432, 4.863, -26.438, -11.3343, 4.863, -22.938, -13.0843, 4.863, -34.188, -17.5843, 9.863, -28.188, -16.8343, 9.863, -26.938, -11.5843, 9.863, -23.188, -6.83432, 9.863, -29.188, -13.0843, 9.863, -34.188, 27.6657, 0.112999, -0.687988, 29.9157, 0.112999, -0.937988, 29.9157, 0.112999, -6.43799, 26.6657, 0.112999, -6.68799, 27.6657, 0.112999, 9.06201, 10.9157, 0.112999, 28.312, 26.6657, 0.112999, -16.438, 28.4157, 0.112999, -16.688, 28.1657, 0.112999, -22.938, 22.1657, 0.112999, -22.938, 21.4157, 0.112999, -21.438, -10.5843, 0.112999, -19.938, -11.8343, 0.112999, -19.938, -26.0843, 0.112999, -15.938, -26.8343, 0.112999, 4.56201, 20.1657, 0.112999, -21.438, -7.33432, 0.112999, 30.562, 0.16568, 0.112999, 30.562, 0.41568, 0.112999, 28.312, -7.58432, 0.112999, 25.312, -3.58432, 0.112999, -28.188, -4.58432, 0.112999, -27.938, -29.5843, 0.112999, 26.062, -18.5843, 0.112999, 26.062, -18.3343, 0.112999, 25.312, -29.5843, 0.112999, 17.062, -28.5843, 0.112999, 4.56201, -17.3343, 0.112999, -24.438, -5.08432, 11.363, -28.938, -4.58432, 11.363, -28.938, -5.08432, 11.363, -29.938, -5.58432, 11.363, -29.938, -5.58432, 11.363, -28.938, -6.83432, 11.113, -26.938, -7.08432, 11.113, -27.438, -29.0843, 0.112999, -14.188, -28.8343, 0.112999, -6.68799, -28.3343, 0.112999, -16.188, -37.0843, 0.112999, -14.188, -19.8343, 0.112999, -26.188, -26.3343, 0.112999, -16.438, -8.08432, 11.113, -26.188, -8.08432, 11.113, -25.688, -7.58432, 11.113, -25.938, -7.58432, 11.113, -26.438, -8.83432, 11.113, -25.188, -8.83432, 11.113, -24.688, -8.33432, 11.113, -24.938, -8.33432, 11.113, -25.438, 19.9157, 5.613, -22.938, 20.4157, 5.613, -22.938, 20.6657, 5.613, -23.938, 18.4157, 5.613, -24.438, 35.6657, 5.613, -23.938, -11.0843, 11.363, -21.938, -12.0843, 11.363, -21.938, -11.0843, 11.363, -20.938, -9.33432, 11.113, -23.688, -9.58432, 11.113, -24.188, 36.4157, 0.112999, -22.938, 37.1657, 0.112999, -16.688, -43.0843, 50.863, -17.188, -43.0843, 50.863, -8.68799, -33.8343, 50.863, -8.68799, -33.8343, 50.863, -17.188, 27.6657, 20.613, -15.688, 27.6657, 20.613, -7.43799, 36.9157, 20.613, -7.43799, 36.9157, 20.613, -15.688, 27.9157, 0.112999, -15.438, 27.9157, 0.112999, -7.68799, 36.6657, 0.112999, -7.68799, 36.6657, 0.112999, -15.438, -39.0843, 20.613, -13.188, -39.0843, 20.613, -8.93799, -34.0843, 20.613, -8.93799, -34.0843, 20.613, -13.188, -29.8343, 20.613, -13.188, -32.8343, 20.613, -13.188, -33.0843, 20.613, -7.68799, -29.8343, 20.613, -4.68799, -39.0843, 20.613, -4.68799, -39.0843, 20.613, -7.68799, -37.0843, 0.112999, -12.938, -37.0843, 0.112999, -4.93799, -30.0843, 0.112999, -4.93799, -30.0843, 0.112999, -12.938, -36.0843, 48.363, -9.68799, -36.0843, 48.363, -8.93799, -34.0843, 48.363, -8.93799, -34.0843, 48.363, -9.68799, -21.8343, 48.363, -9.68799, -32.8343, 48.363, -9.68799, -33.0843, 48.363, -7.68799, -24.0843, 48.363, 34.312, -21.8343, 48.363, 34.062, -36.0843, 48.363, 36.312, -24.0843, 48.363, 36.312, -36.0843, 48.363, -7.68799, -37.5843, 37.613, -9.43799, -37.5843, 37.613, -8.93799, -36.8343, 37.613, -8.93799, -36.8343, 37.613, -9.43799, -37.5843, 37.613, -7.68799, -37.5843, 37.613, 19.562, -36.8343, 37.613, 19.562, -36.8343, 37.613, -7.68799, 37.1657, 0.112999, -0.937988, 37.1657, 0.112999, -6.43799, -29.0843, 0.112999, 2.31201, -28.8343, 0.112999, -3.93799, -37.0843, 0.112999, -3.68799, -37.0843, 0.112999, 2.31201, 28.6657, 20.613, 0.0620117, 28.6657, 20.613, 8.56201, 37.9157, 20.613, 8.56201, 37.9157, 20.613, 0.0620117, 28.9157, 0.112999, 0.312012, 28.9157, 0.112999, 8.31201, 37.1657, 0.112999, 8.31201, 37.1657, 0.112999, 0.312012, -29.0843, 0.112999, 4.31201, -37.0843, 0.112999, 16.562, -29.8343, 0.112999, 16.562, 27.9157, 0.112999, 9.56201, 11.4157, 0.112999, 28.562, 11.4157, 0.112999, 37.062, 37.1657, 0.112999, 37.062, 37.1657, 0.112999, 9.56201, -39.8343, 20.613, 17.562, -39.8343, 20.613, 19.562, -33.3343, 20.613, 19.562, -30.5843, 20.613, 17.562, -33.0843, 20.613, 26.062, -30.5843, 20.613, 26.062, -37.0843, 0.112999, 17.812, -37.0843, 0.112999, 19.562, -33.0843, 0.112999, 19.812, -30.8343, 0.112999, 17.812, -33.0843, 0.112999, 25.812, -30.8343, 0.112999, 25.812, -43.0843, 43.613, 20.562, -43.0843, 43.613, 29.062, -34.0843, 43.613, 29.062, -34.0843, 43.613, 20.562, -39.8343, 20.613, 20.812, -39.8343, 20.613, 26.062, -34.3343, 20.613, 26.062, -34.3343, 20.613, 20.812, -37.5843, 37.613, 20.812, -37.5843, 37.613, 28.812, -36.8343, 37.613, 28.812, -36.8343, 37.613, 20.812, -37.0843, 0.112999, 20.812, -37.0843, 0.112999, 25.812, -34.3343, 0.112999, 25.812, -34.3343, 0.112999, 20.812, -16.3343, 0.112999, 37.062, -16.3343, 0.112999, 35.562, -18.5843, 0.112999, 35.312, -29.8343, 0.112999, 27.062, -33.0843, 0.112999, 27.062, -33.3343, 0.112999, 30.062, -37.0843, 0.112999, 30.062, -37.0843, 0.112999, 37.062, -17.5843, 20.613, 34.562, -16.3343, 20.613, 34.562, -16.0843, 20.613, 27.812, -17.5843, 20.613, 26.312, -8.33432, 20.613, 27.812, -8.33432, 20.613, 26.312, -17.3343, 0.112999, 26.562, -17.3343, 0.112999, 34.312, -8.58432, 0.112999, 34.312, -8.58432, 0.112999, 26.562, -37.0843, 0.112999, 27.062, -37.0843, 0.112999, 28.812, -34.3343, 0.112999, 28.812, -34.3343, 0.112999, 27.062, -15.3343, 50.863, 37.312, -13.3343, 50.863, 37.312, -13.0843, 50.863, 31.312, -15.3343, 50.863, 28.812, -6.08432, 50.863, 31.312, -6.08432, 50.863, 28.812, -15.0843, 20.613, 34.562, -13.3343, 20.613, 34.562, -13.0843, 20.613, 31.312, -15.0843, 20.613, 29.062, -8.33432, 20.613, 31.312, -8.33432, 20.613, 29.062, 1.16568, 20.613, 29.312, 1.16568, 20.613, 31.312, 10.4157, 20.613, 31.312, 10.4157, 20.613, 29.312, 1.41568, 0.112999, 29.562, 1.41568, 0.112999, 37.062, 10.1657, 0.112999, 37.062, 10.1657, 0.112999, 29.562, -7.58432, 0.112999, 35.562, 0.16568, 0.112999, 37.062, -12.3343, 72.613, 32.312, -12.3343, 72.613, 40.812, 16.6657, 72.613, 40.812, 16.6657, 72.613, 32.312, -12.0843, 20.613, 32.562, -12.0843, 20.613, 34.562, -8.33432, 20.613, 34.562, -8.33432, 20.613, 32.562, -12.0843, 50.863, 32.562, -12.0843, 50.863, 37.312, -6.08432, 50.863, 37.312, -6.08432, 50.863, 32.562, 1.16568, 20.613, 32.562, 1.16568, 20.613, 37.812, 10.4157, 20.613, 37.812, 10.4157, 20.613, 32.562, -11.0843, 49.613, 43.312, -11.0843, 49.613, 41.812, -13.3343, 49.613, 41.562, -23.0843, 49.613, 43.312, -13.3343, 49.613, 38.312, -16.3343, 49.613, 38.062, -16.3343, 49.613, 35.062, -23.0843, 49.613, 35.062, -5.33432, 49.613, 38.312, -12.0843, 49.613, 38.312, -12.0843, 49.613, 40.562, 16.4157, 49.613, 40.562, 16.4157, 49.613, 35.062, -5.08432, 49.613, 35.062, 19.9157, 49.613, 35.062, 17.6657, 49.613, 35.062, 17.4157, 49.613, 41.812, 19.9157, 49.613, 43.312, -36.0843, 48.363, 43.312, -24.0843, 48.363, 43.312) +polygons = [PackedInt32Array(3, 2, 0), PackedInt32Array(0, 2, 1), PackedInt32Array(7, 6, 4), PackedInt32Array(4, 6, 5), PackedInt32Array(11, 10, 8), PackedInt32Array(8, 10, 9), PackedInt32Array(15, 14, 12), PackedInt32Array(12, 14, 13), PackedInt32Array(18, 17, 16), PackedInt32Array(16, 20, 19), PackedInt32Array(19, 21, 16), PackedInt32Array(16, 21, 18), PackedInt32Array(18, 21, 23), PackedInt32Array(18, 23, 22), PackedInt32Array(21, 24, 23), PackedInt32Array(26, 25, 27), PackedInt32Array(27, 25, 29), PackedInt32Array(27, 29, 28), PackedInt32Array(27, 28, 18), PackedInt32Array(31, 30, 29), PackedInt32Array(25, 31, 29), PackedInt32Array(28, 17, 18), PackedInt32Array(33, 32, 34), PackedInt32Array(34, 32, 35), PackedInt32Array(26, 27, 36), PackedInt32Array(36, 27, 32), PackedInt32Array(32, 27, 35), PackedInt32Array(38, 37, 39), PackedInt32Array(39, 37, 20), PackedInt32Array(20, 37, 19), PackedInt32Array(42, 41, 40), PackedInt32Array(45, 44, 43), PackedInt32Array(47, 46, 48), PackedInt32Array(48, 46, 49), PackedInt32Array(49, 46, 43), PackedInt32Array(43, 46, 45), PackedInt32Array(48, 49, 50), PackedInt32Array(51, 42, 46), PackedInt32Array(46, 42, 40), PackedInt32Array(46, 40, 45), PackedInt32Array(45, 40, 52), PackedInt32Array(54, 53, 55), PackedInt32Array(55, 53, 56), PackedInt32Array(56, 53, 57), PackedInt32Array(59, 58, 60), PackedInt32Array(60, 58, 61), PackedInt32Array(58, 62, 61), PackedInt32Array(61, 62, 63), PackedInt32Array(67, 66, 68), PackedInt32Array(68, 66, 64), PackedInt32Array(64, 66, 65), PackedInt32Array(70, 69, 71), PackedInt32Array(71, 69, 72), PackedInt32Array(30, 73, 61), PackedInt32Array(75, 74, 76), PackedInt32Array(76, 74, 77), PackedInt32Array(68, 64, 73), PackedInt32Array(73, 64, 61), PackedInt32Array(63, 76, 77), PackedInt32Array(79, 78, 69), PackedInt32Array(69, 78, 30), PackedInt32Array(81, 80, 82), PackedInt32Array(82, 80, 83), PackedInt32Array(78, 29, 30), PackedInt32Array(84, 72, 83), PackedInt32Array(83, 72, 82), PackedInt32Array(82, 72, 77), PackedInt32Array(30, 61, 69), PackedInt32Array(69, 61, 72), PackedInt32Array(72, 61, 77), PackedInt32Array(77, 61, 63), PackedInt32Array(71, 85, 70), PackedInt32Array(88, 87, 86), PackedInt32Array(90, 89, 86), PackedInt32Array(86, 89, 88), PackedInt32Array(92, 90, 91), PackedInt32Array(91, 90, 86), PackedInt32Array(95, 94, 93), PackedInt32Array(95, 93, 96), PackedInt32Array(98, 97, 71), PackedInt32Array(71, 97, 85), PackedInt32Array(96, 23, 95), PackedInt32Array(95, 23, 24), PackedInt32Array(97, 98, 24), PackedInt32Array(24, 98, 95), PackedInt32Array(102, 101, 99), PackedInt32Array(99, 101, 100), PackedInt32Array(106, 105, 103), PackedInt32Array(103, 105, 104), PackedInt32Array(108, 107, 109), PackedInt32Array(109, 107, 110), PackedInt32Array(111, 109, 110), PackedInt32Array(114, 113, 112), PackedInt32Array(116, 115, 112), PackedInt32Array(112, 115, 114), PackedInt32Array(33, 34, 117), PackedInt32Array(117, 34, 118), PackedInt32Array(66, 117, 65), PackedInt32Array(65, 117, 118), PackedInt32Array(122, 121, 119), PackedInt32Array(119, 121, 120), PackedInt32Array(126, 125, 123), PackedInt32Array(123, 125, 124), PackedInt32Array(130, 129, 127), PackedInt32Array(127, 129, 128), PackedInt32Array(134, 133, 131), PackedInt32Array(131, 133, 132), PackedInt32Array(136, 135, 137), PackedInt32Array(137, 135, 138), PackedInt32Array(140, 137, 139), PackedInt32Array(139, 137, 138), PackedInt32Array(144, 143, 141), PackedInt32Array(141, 143, 142), PackedInt32Array(148, 147, 145), PackedInt32Array(145, 147, 146), PackedInt32Array(150, 149, 151), PackedInt32Array(151, 149, 153), PackedInt32Array(151, 153, 152), PackedInt32Array(155, 154, 152), PackedInt32Array(152, 154, 151), PackedInt32Array(151, 154, 156), PackedInt32Array(160, 159, 157), PackedInt32Array(157, 159, 158), PackedInt32Array(164, 163, 161), PackedInt32Array(161, 163, 162), PackedInt32Array(60, 166, 59), PackedInt32Array(59, 166, 165), PackedInt32Array(170, 169, 167), PackedInt32Array(167, 169, 168), PackedInt32Array(174, 173, 171), PackedInt32Array(171, 173, 172), PackedInt32Array(178, 177, 175), PackedInt32Array(175, 177, 176), PackedInt32Array(170, 167, 179), PackedInt32Array(179, 84, 170), PackedInt32Array(170, 84, 181), PackedInt32Array(170, 181, 180), PackedInt32Array(84, 83, 181), PackedInt32Array(183, 63, 182), PackedInt32Array(182, 63, 62), PackedInt32Array(184, 183, 185), PackedInt32Array(185, 183, 182), PackedInt32Array(185, 182, 186), PackedInt32Array(188, 187, 189), PackedInt32Array(189, 187, 190), PackedInt32Array(191, 189, 192), PackedInt32Array(192, 189, 190), PackedInt32Array(194, 193, 195), PackedInt32Array(195, 193, 196), PackedInt32Array(197, 195, 198), PackedInt32Array(198, 195, 196), PackedInt32Array(202, 201, 199), PackedInt32Array(199, 201, 200), PackedInt32Array(206, 205, 203), PackedInt32Array(203, 205, 204), PackedInt32Array(210, 209, 207), PackedInt32Array(207, 209, 208), PackedInt32Array(214, 213, 211), PackedInt32Array(211, 213, 212), PackedInt32Array(217, 216, 215), PackedInt32Array(220, 219, 218), PackedInt32Array(222, 221, 220), PackedInt32Array(80, 81, 218), PackedInt32Array(218, 81, 217), PackedInt32Array(220, 218, 222), PackedInt32Array(222, 218, 217), PackedInt32Array(222, 217, 215), PackedInt32Array(224, 223, 225), PackedInt32Array(225, 223, 226), PackedInt32Array(227, 225, 228), PackedInt32Array(228, 225, 226), PackedInt32Array(232, 231, 229), PackedInt32Array(229, 231, 230), PackedInt32Array(236, 235, 233), PackedInt32Array(233, 235, 234), PackedInt32Array(238, 237, 239), PackedInt32Array(239, 237, 240), PackedInt32Array(241, 239, 242), PackedInt32Array(242, 239, 240), PackedInt32Array(244, 243, 245), PackedInt32Array(245, 243, 246), PackedInt32Array(247, 245, 248), PackedInt32Array(248, 245, 246), PackedInt32Array(252, 251, 249), PackedInt32Array(249, 251, 250), PackedInt32Array(256, 255, 253), PackedInt32Array(253, 255, 254), PackedInt32Array(216, 257, 215), PackedInt32Array(215, 257, 258), PackedInt32Array(74, 75, 257), PackedInt32Array(257, 75, 258), PackedInt32Array(262, 261, 259), PackedInt32Array(259, 261, 260), PackedInt32Array(266, 265, 263), PackedInt32Array(263, 265, 264), PackedInt32Array(270, 269, 267), PackedInt32Array(267, 269, 268), PackedInt32Array(274, 273, 271), PackedInt32Array(271, 273, 272), PackedInt32Array(276, 275, 277), PackedInt32Array(277, 275, 278), PackedInt32Array(280, 279, 277), PackedInt32Array(282, 281, 280), PackedInt32Array(277, 278, 280), PackedInt32Array(280, 278, 282), PackedInt32Array(284, 283, 285), PackedInt32Array(285, 283, 286), PackedInt32Array(288, 287, 283), PackedInt32Array(283, 287, 286), PackedInt32Array(290, 289, 291), PackedInt32Array(291, 289, 292), PackedInt32Array(276, 291, 275), PackedInt32Array(275, 291, 292), PackedInt32Array(294, 293, 155), PackedInt32Array(155, 293, 154)] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_6yrih"] albedo_color = Color(0.300579, 0.462784, 0.249767, 1) [node name="EnemyWork" type="Node3D" node_paths=PackedStringArray("player")] script = ExtResource("1_laua1") +load_save = false player = NodePath("Player") start_health = 10 MAX_PARTICLES = 75 gun_1 = ExtResource("2_poauc") gun_2 = ExtResource("3_xdb5c") +expected_ammo = { +"heavy": 25, +"light": 500, +"medium": 50, +"rocket": 3, +"shotgun": 20 +} [node name="Player" parent="." instance=ExtResource("4_a8lcp")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 26.4194, 1.40016, -29.1943) -AUDIO = false [node name="WorldEnvironment" type="WorldEnvironment" parent="."] environment = SubResource("Environment_klp4b") @@ -96,6 +105,24 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -9.78351, 2.86102e-06, 21.605 [node name="spider12" parent="EnemyHivemind1" instance=ExtResource("6_qmuhr")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -9.33622, -1.36424e-12, 14.3065) +[node name="spider13" parent="EnemyHivemind1" instance=ExtResource("6_qmuhr")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -30.0234, 48.4515, 1.40028) + +[node name="spider14" parent="EnemyHivemind1" instance=ExtResource("6_qmuhr")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -27.2028, 48.4515, 3.9282) + +[node name="spider15" parent="EnemyHivemind1" instance=ExtResource("6_qmuhr")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -26.7555, 48.4515, -3.3705) + +[node name="spider16" parent="EnemyHivemind1" instance=ExtResource("6_qmuhr")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -31.1425, 48.4515, 19.0773) + +[node name="spider17" parent="EnemyHivemind1" instance=ExtResource("6_qmuhr")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -28.322, 48.4515, 21.6052) + +[node name="spider18" parent="EnemyHivemind1" instance=ExtResource("6_qmuhr")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -27.8747, 48.4515, 14.3065) + [node name="EnemyHivemind2" type="Node3D" parent="." groups=["enemy_hivemind"]] script = ExtResource("5_ngmqi") @@ -146,6 +173,108 @@ use_collision = true size = Vector3(16.626, 5.39923, 1) material = ExtResource("7_l3crk") +[node name="CSGBox3D7" type="CSGBox3D" parent="NavigationRegion3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 49.2717, 2.4345, -29.7319) +use_collision = true +size = Vector3(16.626, 5.39923, 1) +material = ExtResource("7_l3crk") + +[node name="CSGBox3D18" type="CSGBox3D" parent="NavigationRegion3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 79.064, 2.4345, -21.269) +use_collision = true +size = Vector3(52.6997, 5.39923, 1) +material = ExtResource("7_l3crk") + +[node name="CSGBox3D21" type="CSGBox3D" parent="NavigationRegion3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 33.3209, 9.43937, 4.37043) +use_collision = true +size = Vector3(9.97656, 21.4505, 9.16638) +material = ExtResource("7_l3crk") + +[node name="CSGBox3D22" type="CSGBox3D" parent="NavigationRegion3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 32.3899, 9.43937, -11.5455) +use_collision = true +size = Vector3(9.97656, 21.4505, 9.16638) +material = ExtResource("7_l3crk") + +[node name="CSGBox3D23" type="CSGBox3D" parent="NavigationRegion3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.69811, 9.43937, 33.5882) +use_collision = true +size = Vector3(9.97656, 21.4505, 9.16638) +material = ExtResource("7_l3crk") + +[node name="CSGBox3D24" type="CSGBox3D" parent="NavigationRegion3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -13.0186, 9.43937, 30.4171) +use_collision = true +size = Vector3(9.97656, 21.4505, 9.16638) +material = ExtResource("7_l3crk") + +[node name="CSGBox3D25" type="CSGBox3D" parent="NavigationRegion3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -35.3074, 9.43937, 21.8818) +use_collision = true +size = Vector3(9.97656, 21.4505, 9.16638) +material = ExtResource("7_l3crk") + +[node name="CSGBox3D26" type="CSGBox3D" parent="NavigationRegion3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -34.3676, 9.43937, -8.90991) +use_collision = true +size = Vector3(9.97656, 21.4505, 9.16638) +material = ExtResource("7_l3crk") + +[node name="CSGBox3D27" type="CSGBox3D" parent="NavigationRegion3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -38.596, 20.9172, 24.8561) +use_collision = true +size = Vector3(9.97656, 44.4063, 9.16638) +material = ExtResource("7_l3crk") + +[node name="CSGBox3D33" type="CSGBox3D" parent="NavigationRegion3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -37.2622, 29.6833, 9.84125) +use_collision = true +size = Vector3(1.59583, 14.9244, 39.196) +material = ExtResource("7_l3crk") + +[node name="CSGBox3D28" type="CSGBox3D" parent="NavigationRegion3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -38.5405, 31.1109, -13.0106) +use_collision = true +size = Vector3(9.97656, 38.7305, 9.16638) +material = ExtResource("7_l3crk") + +[node name="CSGBox3D29" type="CSGBox3D" parent="NavigationRegion3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.6473, 31.1109, 33.0949) +use_collision = true +size = Vector3(9.97656, 38.7305, 9.16638) +material = ExtResource("7_l3crk") + +[node name="CSGBox3D31" type="CSGBox3D" parent="NavigationRegion3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.57707, 44.6107, 39.2808) +use_collision = true +size = Vector3(43.8097, 9.06513, 9.16638) +material = ExtResource("7_l3crk") + +[node name="CSGBox3D32" type="CSGBox3D" parent="NavigationRegion3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -28.956, 46.6005, 16.9128) +use_collision = true +size = Vector3(14.8402, 2.81035, 53.9024) +material = ExtResource("7_l3crk") + +[node name="CSGBox3D30" type="CSGBox3D" parent="NavigationRegion3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.1916, 41.9422, 36.5018) +use_collision = true +size = Vector3(29.7696, 60.3931, 9.16638) +material = ExtResource("7_l3crk") + +[node name="CSGBox3D19" type="CSGBox3D" parent="NavigationRegion3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 120.435, -2.93615, -42.495) +use_collision = true +size = Vector3(52.6997, 16.1405, 1) +material = ExtResource("7_l3crk") + +[node name="CSGBox3D20" type="CSGBox3D" parent="NavigationRegion3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 154.358, -1.53405, -21.7154) +use_collision = true +size = Vector3(52.6997, 13.3363, 1) +material = ExtResource("7_l3crk") + [node name="CSGBox3D8" type="CSGBox3D" parent="NavigationRegion3D"] transform = Transform3D(0.790048, 0, -0.613045, 0, 1, 0, 0.613045, 0, 0.790048, 14.5597, 2.4345, -27.4493) material_override = ExtResource("7_l3crk") @@ -232,3 +361,13 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -12.7187, -0.500688, -37.3549 transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -12.7245, -0.170555, -36.0291) [node name="PostProcessing" parent="." instance=ExtResource("16_p7sg0")] + +[node name="JumpPlatform" parent="." instance=ExtResource("17_8q5j4")] +transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, -16.9937, -0.170557, 23.9329) +jump_amount = 15 + +[node name="JumpPlatform2" parent="." instance=ExtResource("17_8q5j4")] +transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, -17.0593, 20.0922, 27.614) + +[node name="pistol1_pickup2" parent="." instance=ExtResource("18_uhe6c")] +transform = Transform3D(0.469225, -0.883079, 0, 0.883079, 0.469225, 0, 0, 0, 1, 0.538504, 0.341105, -29.9358) diff --git a/scenes/test_level_2v2.tscn b/scenes/test_level_2v2.tscn index 17d3185..f33a5ff 100644 --- a/scenes/test_level_2v2.tscn +++ b/scenes/test_level_2v2.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=123 format=4 uid="uid://dyop6vk3rgkkb"] +[gd_scene load_steps=124 format=4 uid="uid://dyop6vk3rgkkb"] [ext_resource type="Script" path="res://scripts/LevelManager.gd" id="1_orhgl"] [ext_resource type="Texture2D" uid="uid://dqs06ic3vjtwk" path="res://assets/Models/asphalt1.albedo.jpg" id="1_w4rag"] @@ -43,6 +43,7 @@ [ext_resource type="PackedScene" uid="uid://d4suhr3allsj" path="res://assets/revolver2_pickup.tscn" id="42_2cdbd"] [ext_resource type="PackedScene" uid="uid://dws4iro7820fc" path="res://assets/pistol1_pickup.tscn" id="42_mmvms"] [ext_resource type="PackedScene" uid="uid://bj1y0fbjtul4a" path="res://post_processing.tscn" id="43_82hec"] +[ext_resource type="PackedScene" uid="uid://ba77auqukaag" path="res://assets/houston_downtown.tscn" id="44_xigrv"] [sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_nb6x7"] sky_top_color = Color(0.500562, 0.697334, 0.809889, 1) @@ -1609,3 +1610,6 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.93409, 5.69926, 1.22332) [node name="PostProcessing" parent="." instance=ExtResource("43_82hec")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8.35692, 7.15345, 5.33085) + +[node name="HoustonDowntown" parent="." instance=ExtResource("44_xigrv")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -13.2553, 0) diff --git a/scripts/bullet_cam.gd b/scripts/bullet_cam.gd index 382a3bb..015dc3f 100644 --- a/scripts/bullet_cam.gd +++ b/scripts/bullet_cam.gd @@ -51,7 +51,7 @@ func _input(event): # Called when the node enters the scene tree for the first time. func _ready(): - Engine.time_scale = .01 + Engine.time_scale = .02 player.gamespeed_controlled = true player.controlled_elsewhere = true player_cam_FOV = player.camera.fov @@ -78,7 +78,7 @@ func _physics_process(delta): if Input.is_action_pressed("sprint"): Engine.time_scale = .05 else: - Engine.time_scale = .01 + Engine.time_scale = .02 focus_on_target() @@ -117,6 +117,7 @@ func focus_on_target(): camera.attributes.dof_blur_far_enabled = true camera.attributes.dof_blur_far_distance = camera.global_position.distance_to(cam_ray.get_collision_point()) + 5.0 camera.attributes.dof_blur_near_enabled = true + camera.attributes.dof_blur_near_distance = camera.global_position.distance_to(cam_ray.get_collision_point()) - 10.0 camera.attributes.dof_blur_amount = lerp(0.0,BLUR_AMOUNT,1.0 - Engine.time_scale) func log_path(delta): @@ -130,17 +131,17 @@ func log_path(delta): record_id += 1 func despawn(): - var read_record = record_id - 1 - for i in bullet_path: - if read_record > 1: - camera.global_position = lerp(bullet_path[read_record]["global_position"],bullet_path[read_record-1]["global_position"],bullet_path[read_record]["delta"]) - await get_tree().create_timer(bullet_path[read_record]["delta"]).timeout - read_record -= 1 - if read_record <= 0: - player.camera.current = true - player.controlled_elsewhere = false - player.gamespeed_controlled = false - ##visible = false - ##collision_shape.disabled = true - ##await get_tree().create_timer(1).timeout - queue_free() + #var read_record = record_id - 1 + #for i in bullet_path: + #if read_record > 1: + #camera.global_position = lerp(bullet_path[read_record]["global_position"],bullet_path[read_record-1]["global_position"],bullet_path[read_record]["delta"]) + #await get_tree().create_timer(bullet_path[read_record]["delta"]).timeout + #read_record -= 1 + #if read_record <= 0: + player.camera.current = true + player.controlled_elsewhere = false + player.gamespeed_controlled = false + ##visible = false + ##collision_shape.disabled = true + ##await get_tree().create_timer(1).timeout + queue_free() diff --git a/scripts/player.gd b/scripts/player.gd index e6355a4..93fafb3 100644 --- a/scripts/player.gd +++ b/scripts/player.gd @@ -73,7 +73,9 @@ var gun_is_holstered = false @onready var level_control = get_tree().current_scene @onready var interact_ray = $Head/Recoil/Camera3D/InteractRay @onready var bullet_ray = $Head/Recoil/Camera3D/BulletRay -@onready var velocity_ray: RayCast3D = $velocity_ray +@onready var wall_ray_1: RayCast3D = $wall_ray1 +@onready var wall_ray_2: RayCast3D = $wall_ray2 +@onready var wall_ray_3: RayCast3D = $wall_ray3 @onready var hitmarker = load("res://hitmarker.tscn") var instance_bullet var instance_casing @@ -112,6 +114,10 @@ var held_key_check = 0.0 # Slow Down Variables var remaining_stamina : float = MAX_STAMINA + +# Wall Jump +var can_wall_jump = true + # Pickups var picked_up = false var picked_up_text @@ -156,6 +162,7 @@ var controlled_elsewhere = false @onready var hud: Control = $Head/Recoil/Camera3D/HUD @onready var clock_sound: AudioStreamPlayer = $Audio/ClockSound @onready var weapon_select_menu: Control = $Head/Recoil/Camera3D/WeaponSelect +@onready var wall_jump_timer: Timer = $WallJumpTimer func _ready(): @@ -208,7 +215,6 @@ func _physics_process(delta): if !dead and !level_control.paused: - # Add the gravity. if is_on_floor(): double_jump = true @@ -226,7 +232,7 @@ func _physics_process(delta): weapon_dip_pos += JUMP_WEAPON_DIP crouched = false elif wall_jump(): - velocity += 2 * Vector3(-velocity.x,10,-velocity.z) + velocity += Vector3(velocity.x * 5,10,velocity.z * 5) elif double_jump == true and !is_climbing: velocity.y += JUMP_VELOCITY double_jump = false @@ -249,7 +255,17 @@ func _physics_process(delta): velocity.x += direction.x * DASH_SPEED velocity.z += direction.z * DASH_SPEED air_dash -= 1 - + + if Input.is_action_pressed("move_left"): + wall_ray_1.enabled = true + else: + wall_ray_1.enabled = false + + if Input.is_action_pressed("move_right"): + wall_ray_2.enabled = true + else: + wall_ray_2.enabled = false + if Input.is_action_just_pressed("crouch"): if crouched: if !crouch_check.is_colliding(): @@ -290,6 +306,12 @@ func _physics_process(delta): else: velocity.x = lerp(velocity.x, direction.x * speed, delta * 6.5) velocity.z = lerp(velocity.z, direction.z * speed, delta * 6.5) + ## wall_run + if wall_ray_1.is_colliding() or wall_ray_2.is_colliding(): + if abs(Vector2(velocity.x,velocity.y)) >= Vector2(5.0,5.0): + velocity.y = clamp(velocity.y,-2,abs(velocity.y)) + #velocity.x += -velocity.x * .01 * delta + #velocity.z += -velocity.z * .01 * delta # Head bob t_bob += delta * velocity.length() * float(is_on_floor()) @@ -560,14 +582,20 @@ func ladder_collide(): gravity = default_gravity func wall_jump(): - velocity_ray.rotation = velocity.normalized() - print("VELOCITY NORMALIZED: ",velocity.normalized()) - print("VELOCITY RAY ROTATION: ", velocity_ray.rotation) - if velocity_ray.is_colliding(): - return true + print("CAN JUMP? ",can_wall_jump) + if can_wall_jump == true: + if wall_ray_1.is_colliding() or wall_ray_2.is_colliding() or wall_ray_3.is_colliding(): + can_wall_jump = false + wall_jump_timer.start() + return true + else: + return false else: return false +func _on_wall_jump_timer_timeout() -> void: + can_wall_jump = true + ## VARIOUS ACTIONS func flashlight_toggle(): if flashlight_on: