diff --git a/levels/prototype_scene.tscn b/levels/prototype_scene.tscn index 0d6f3af..6884dd0 100644 --- a/levels/prototype_scene.tscn +++ b/levels/prototype_scene.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=24 format=3 uid="uid://cqrh2cc7m2i7f"] +[gd_scene load_steps=25 format=3 uid="uid://cqrh2cc7m2i7f"] [ext_resource type="Environment" uid="uid://d0cfgtx2yxw13" path="res://environments/prototype_environment.tres" id="1_i6jab"] [ext_resource type="Material" uid="uid://bx3f5vx71ynh5" path="res://materials/Graymat.tres" id="4_y6i55"] @@ -19,6 +19,7 @@ [ext_resource type="Script" uid="uid://bala54fa32e35" path="res://scripts/gui/hud/player_round_display.gd" id="17_wsuwo"] [ext_resource type="Script" uid="uid://bos7nftlx8tv3" path="res://scripts/gui/hud/player_round_time.gd" id="18_0hcup"] [ext_resource type="Script" uid="uid://m8qq2eynls6n" path="res://scripts/gui/team_choice_menu.gd" id="19_0hcup"] +[ext_resource type="PackedScene" uid="uid://l4t1mflutm3t" path="res://scenes/projectiles/molikman/molikman_molotov_fire.tscn" id="20_gcyg7"] [sub_resource type="BoxShape3D" id="BoxShape3D_ysk2e"] size = Vector3(15.324341, 0.96273804, 21.381592) @@ -49,11 +50,13 @@ size = Vector3(1.5958366, 1.7258911, 1.7827377) material = ExtResource("5_foctg") [node name="CSGCombiner3D" type="CSGCombiner3D" parent="."] +layers = 5 use_collision = true collision_mask = 9 [node name="CSGBox3D" type="CSGBox3D" parent="CSGCombiner3D"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.774414, -16.123535, 1.8908081) +layers = 5 material_override = ExtResource("5_bno23") use_collision = true size = Vector3(126.25586, 33.24707, 100.838135) @@ -61,169 +64,200 @@ material = ExtResource("4_y6i55") [node name="CSGBox3D18" type="CSGBox3D" parent="CSGCombiner3D"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 20.487278, 3.9812875, -24.729654) +layers = 5 size = Vector3(4.0271816, 7.1272583, 33.69597) material = ExtResource("5_bno23") [node name="CSGBox3D19" type="CSGBox3D" parent="CSGCombiner3D/CSGBox3D18"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.0283356, 4.066929) +layers = 5 operation = 2 size = Vector3(4.0271816, 5.070587, 6.0345716) material = ExtResource("5_bno23") [node name="CSGBox3D20" type="CSGBox3D" parent="CSGCombiner3D/CSGBox3D18"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.0283356, -14.085073) +layers = 5 operation = 2 size = Vector3(4.0271816, 5.070587, 3.538221) material = ExtResource("5_bno23") [node name="CSGBox3D5" type="CSGBox3D" parent="CSGCombiner3D"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -9.558285, 4.018885, 10.9794445) +layers = 5 size = Vector3(3.9233856, 7.2024536, 37.7959) material = ExtResource("5_bno23") [node name="CSGBox3D6" type="CSGBox3D" parent="CSGCombiner3D/CSGBox3D5"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.4021583, 3.7736359) +layers = 5 operation = 2 size = Vector3(3.9233856, 4.9065094, 8.765167) material = ExtResource("5_bno23") [node name="CSGBox3D7" type="CSGBox3D" parent="CSGCombiner3D/CSGBox3D5"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.4006386, 1.7042251, 3.8919868) +layers = 5 operation = 2 size = Vector3(3.9233856, 6.302376, 16.471077) material = ExtResource("5_bno23") [node name="CSGBox3D6" type="CSGBox3D" parent="CSGCombiner3D"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -14.816613, 1.4951501, 14.911085) +layers = 5 size = Vector3(7.2811394, 2.1549835, 16.348633) material = ExtResource("5_bno23") [node name="CSGBox3D9" type="CSGBox3D" parent="CSGCombiner3D/CSGBox3D6"] transform = Transform3D(0.91243464, -0.40922245, 0, 0.40922245, 0.91243464, 0, 0, 0, 1, -2.315074, 0.8311236, 0) +layers = 5 operation = 2 size = Vector3(7.1386776, 2.1549835, 16.348633) material = ExtResource("5_bno23") [node name="CSGBox3D25" type="CSGBox3D" parent="CSGCombiner3D"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.4624505, 2.707026, -12.430679) +layers = 5 size = Vector3(1.047142, 4.5787354, 9.918747) material = ExtResource("4_yx0ab") [node name="CSGBox3D26" type="CSGBox3D" parent="CSGCombiner3D"] transform = Transform3D(0.9261539, 0, 0.37714583, 0, 1, 0, -0.37714583, 0, 0.9261539, 18.061287, 5.907801, 25.213737) +layers = 5 size = Vector3(3.9233856, 10.980286, 10.570801) material = ExtResource("5_bno23") [node name="CSGBox3D27" type="CSGBox3D" parent="CSGCombiner3D"] transform = Transform3D(0.9261539, 0, 0.37714583, 0, 1, 0, -0.37714583, 0, 0.9261539, 26.334145, 5.907801, 23.006517) +layers = 5 size = Vector3(3.9233856, 10.980286, 33.98561) material = ExtResource("5_bno23") [node name="CSGBox3D28" type="CSGBox3D" parent="CSGCombiner3D/CSGBox3D27"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.9558008, -2.7094269, -1.7904329) +layers = 5 operation = 2 size = Vector3(7.4409294, 5.561432, 8.996315) material = ExtResource("5_bno23") [node name="CSGBox3D10" type="CSGBox3D" parent="CSGCombiner3D"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.8908911, 11.176111, -1.6231918) +layers = 5 size = Vector3(101.37683, 21.516907, 87.89482) material = ExtResource("6_8bje3") [node name="CSGBox3D11" type="CSGBox3D" parent="CSGCombiner3D/CSGBox3D10"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.527359, -3.7662811, 0.11615372) +layers = 5 operation = 2 size = Vector3(92.75583, 29.049469, 78.20011) material = ExtResource("6_8bje3") [node name="CSGBox3D12" type="CSGBox3D" parent="CSGCombiner3D/CSGBox3D10"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -30.466297, 8.756718, 19.084272) +layers = 5 operation = 2 size = Vector3(53.52636, 29.049469, 61.62032) material = ExtResource("6_8bje3") [node name="CSGBox3D16" type="CSGBox3D" parent="CSGCombiner3D"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -28.345552, 11.806246, -24.122513) +layers = 5 size = Vector3(41.466846, 22.777176, 35.36573) material = ExtResource("5_bno23") [node name="CSGBox3D18" type="CSGBox3D" parent="CSGCombiner3D/CSGBox3D16"] transform = Transform3D(0.07983352, 0, 0.9968083, 0, 1, 0, -0.9968083, 0, 0.07983352, 7.1200104, -9.519702, 10.70941) +layers = 5 operation = 2 size = Vector3(20.900824, 3.737772, 6.9975586) material = ExtResource("5_bno23") [node name="CSGBox3D19" type="CSGBox3D" parent="CSGCombiner3D/CSGBox3D16"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 13.488387, -9.519702, 1.6905918) +layers = 5 operation = 2 size = Vector3(18.856493, 3.737772, 4.796875) material = ExtResource("5_bno23") [node name="CSGBox3D4" type="CSGBox3D" parent="CSGCombiner3D"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 8.018553, 9.821699, -20.33673) +layers = 5 size = Vector3(7.688137, 18.808083, 7.111515) material = ExtResource("6_foctg") [node name="CSGBox3D21" type="CSGBox3D" parent="CSGCombiner3D"] transform = Transform3D(0.99998313, 0, -0.005811914, 0, 1, 0, 0.005811914, 0, 0.99998313, 7.7764754, 2.6420484, -35.90064) +layers = 5 size = Vector3(21.894361, 4.44878, 2.406681) material = ExtResource("4_yx0ab") [node name="CSGBox3D30" type="CSGBox3D" parent="CSGCombiner3D"] transform = Transform3D(0.99998313, 0, -0.005811914, 0, 1, 0, 0.005811914, 0, 0.99998313, -1.0181996, 6.118735, -35.927147) +layers = 5 size = Vector3(1.8304019, 2.8889408, 1.5464945) material = ExtResource("4_yx0ab") [node name="CSGBox3D31" type="CSGBox3D" parent="CSGCombiner3D"] transform = Transform3D(0.99998313, 0, -0.005811914, 0, 1, 0, 0.005811914, 0, 0.99998313, 2.7812057, 6.118735, -35.927147) +layers = 5 size = Vector3(1.8304019, 2.8889408, 1.5464945) material = ExtResource("4_yx0ab") [node name="CSGBox3D32" type="CSGBox3D" parent="CSGCombiner3D"] transform = Transform3D(0.99998313, 0, -0.005811914, 0, 1, 0, 0.005811914, 0, 0.99998313, 8.024893, 6.118735, -35.927147) +layers = 5 size = Vector3(1.8304019, 2.8889408, 1.5464945) material = ExtResource("4_yx0ab") [node name="CSGBox3D33" type="CSGBox3D" parent="CSGCombiner3D"] transform = Transform3D(0.99998313, 0, -0.005811914, 0, 1, 0, 0.005811914, 0, 0.99998313, 12.4400835, 6.118735, -35.927147) +layers = 5 size = Vector3(1.8304019, 2.8889408, 1.5464945) material = ExtResource("4_yx0ab") [node name="CSGBox3D34" type="CSGBox3D" parent="CSGCombiner3D"] transform = Transform3D(0.99998313, 0, -0.005811914, 0, 1, 0, 0.005811914, 0, 0.99998313, 17.691769, 6.118735, -35.927147) +layers = 5 size = Vector3(1.8304019, 2.8889408, 1.5464945) material = ExtResource("4_yx0ab") [node name="CSGBox3D24" type="CSGBox3D" parent="CSGCombiner3D"] transform = Transform3D(1, 0, 0, 0, 0.93200153, -0.3624543, 0, 0.3624543, 0.93200153, 5.8547053, 8.527166, -37.974197) +layers = 5 size = Vector3(27.032001, 1.3384781, 6.2376566) material = ExtResource("7_8bje3") [node name="CSGBox3D2" type="CSGBox3D" parent="CSGCombiner3D"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 11.225314, 11.40127, 6.9663224) +layers = 5 size = Vector3(22.55111, 21.967224, 29.769653) material = ExtResource("5_bno23") [node name="CSGBox3D" type="CSGBox3D" parent="CSGCombiner3D/CSGBox3D2"] transform = Transform3D(0.83269906, 0, -0.55372584, 0, 1, 0, 0.55372584, 0, 0.83269906, -8.022983, -9.618128, -0.23815984) +layers = 5 operation = 2 size = Vector3(10.669815, 4.566284, 3.4625244) material = ExtResource("7_8bje3") [node name="CSGBox3D2" type="CSGBox3D" parent="CSGCombiner3D/CSGBox3D2"] transform = Transform3D(0.7501458, 0, -0.6612725, 0, 1, 0, 0.6612725, 0, 0.7501458, -11.704424, 0.31690216, 13.1721115) +layers = 5 operation = 2 size = Vector3(40.650864, 24.43634, 14.330154) material = ExtResource("5_bno23") [node name="CSGBox3D4" type="CSGBox3D" parent="CSGCombiner3D/CSGBox3D2"] transform = Transform3D(0.7731101, 0, 0.6342719, 0, 1, 0, -0.6342719, 0, 0.7731101, 9.996494, 0.31690216, 9.775394) +layers = 5 operation = 2 size = Vector3(40.650864, 24.43634, 14.330154) material = ExtResource("5_bno23") [node name="CSGBox3D3" type="CSGBox3D" parent="CSGCombiner3D/CSGBox3D2"] transform = Transform3D(0.9337244, 0, 0.35799336, 0, 1, 0, -0.35799336, 0, 0.9337244, 2.7047615, -9.61813, -0.02129364) +layers = 5 operation = 2 size = Vector3(20.339264, 4.566284, 3.4625244) material = ExtResource("7_8bje3") @@ -380,6 +414,9 @@ text = "Defenders" layout_mode = 2 text = "Cancel" +[node name="MolikmanMolotovFire" parent="." instance=ExtResource("20_gcyg7")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -25.65116, 0.67484045, 14.924126) + [connection signal="pressed" from="CanvasLayer/CenterContainer/Panel/VBoxContainer/HBoxContainer/SpectatorButton" to="CanvasLayer/CenterContainer" method="_on_spectator_button_pressed"] [connection signal="pressed" from="CanvasLayer/CenterContainer/Panel/VBoxContainer/HBoxContainer/AttackButton" to="CanvasLayer/CenterContainer" method="_on_attack_button_pressed"] [connection signal="pressed" from="CanvasLayer/CenterContainer/Panel/VBoxContainer/HBoxContainer/DefenceButton" to="CanvasLayer/CenterContainer" method="_on_defence_button_pressed"] diff --git a/project.godot b/project.godot index 22a7994..5438400 100644 --- a/project.godot +++ b/project.godot @@ -169,6 +169,7 @@ menu_team_choice={ 3d_render/layer_1="MainRender" 3d_render/layer_2="ViewRender" +3d_render/layer_3="Ground" 3d_physics/layer_1="Surroundings" 3d_physics/layer_2="Players" 3d_physics/layer_3="Gadgets" diff --git a/scenes/projectiles/molikman/molikman_molotov_fire.gd b/scenes/projectiles/molikman/molikman_molotov_fire.gd new file mode 100644 index 0000000..19307a9 --- /dev/null +++ b/scenes/projectiles/molikman/molikman_molotov_fire.gd @@ -0,0 +1,24 @@ +extends Area3D + +@export var dps: float +@export var damage_timer: Timer + +var damage_targets: Array[Player] + +func _ready() -> void: + body_entered.connect(on_body_entered) + body_exited.connect(on_body_exited) + +func damage(): + for target in damage_targets: + if target.is_on_floor(): + target.take_damage(int(dps*damage_timer.wait_time)) + +func on_body_entered(body: Node3D): + + if body is Player: + damage_targets.append(body) + +func on_body_exited(body: Node3D): + if body is Player: + damage_targets.erase(body) diff --git a/scenes/projectiles/molikman/molikman_molotov_fire.gd.uid b/scenes/projectiles/molikman/molikman_molotov_fire.gd.uid new file mode 100644 index 0000000..bdf7701 --- /dev/null +++ b/scenes/projectiles/molikman/molikman_molotov_fire.gd.uid @@ -0,0 +1 @@ +uid://bo0ij4miuksua diff --git a/scenes/projectiles/molikman/molikman_molotov_fire.tscn b/scenes/projectiles/molikman/molikman_molotov_fire.tscn new file mode 100644 index 0000000..6e3d70b --- /dev/null +++ b/scenes/projectiles/molikman/molikman_molotov_fire.tscn @@ -0,0 +1,69 @@ +[gd_scene load_steps=10 format=3 uid="uid://l4t1mflutm3t"] + +[ext_resource type="Texture2D" uid="uid://bmnqvop2dy5pm" path="res://textures/prototype_yellow_256x256.png" id="1_hr7p8"] +[ext_resource type="Script" uid="uid://bo0ij4miuksua" path="res://scenes/projectiles/molikman/molikman_molotov_fire.gd" id="1_qokq0"] +[ext_resource type="Texture2D" uid="uid://b8aqstr5es5x4" path="res://textures/prototype_orange_256x256.png" id="2_qokq0"] + +[sub_resource type="CylinderShape3D" id="CylinderShape3D_hr7p8"] +height = 3.0 +radius = 1.5 + +[sub_resource type="Gradient" id="Gradient_hr7p8"] +colors = PackedColorArray(1, 0.53333336, 0, 1, 0.45, 0.45, 0.45, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_qokq0"] +gradient = SubResource("Gradient_hr7p8") + +[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_hr7p8"] +emission_shape_scale = Vector3(1.5, 1.5, 1.5) +emission_shape = 1 +emission_sphere_radius = 1.0 +direction = Vector3(0, 1, 0) +initial_velocity_max = 3.4499998 +orbit_velocity_min = -0.46899992 +orbit_velocity_max = 0.4130001 +gravity = Vector3(0, 0, 0) +tangential_accel_min = -3.4500022 +tangential_accel_max = 2.0699978 +color_ramp = SubResource("GradientTexture1D_qokq0") + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_qokq0"] + +[sub_resource type="TextMesh" id="TextMesh_33jv6"] +material = SubResource("StandardMaterial3D_qokq0") +text = "fire" + +[node name="MolikmanMolotovFire" type="Area3D" node_paths=PackedStringArray("damage_timer")] +collision_layer = 8 +collision_mask = 2 +script = ExtResource("1_qokq0") +dps = 25.0 +damage_timer = NodePath("DamageTimer") + +[node name="Decal" type="Decal" parent="."] +size = Vector3(3, 3, 3) +texture_albedo = ExtResource("1_hr7p8") +texture_emission = ExtResource("2_qokq0") +emission_energy = 0.25 +cull_mask = 1048572 + +[node name="CollisionShape3D" type="CollisionShape3D" parent="."] +shape = SubResource("CylinderShape3D_hr7p8") + +[node name="GPUParticles3D" type="GPUParticles3D" parent="."] +amount = 16 +transform_align = 1 +process_material = SubResource("ParticleProcessMaterial_hr7p8") +draw_pass_1 = SubResource("TextMesh_33jv6") + +[node name="DieTimer" type="Timer" parent="."] +wait_time = 15.0 +one_shot = true +autostart = true + +[node name="DamageTimer" type="Timer" parent="."] +wait_time = 0.25 +autostart = true + +[connection signal="timeout" from="DieTimer" to="." method="queue_free"] +[connection signal="timeout" from="DamageTimer" to="." method="damage"]