Falling props

This commit is contained in:
MaddoScientisto 2025-07-04 22:55:28 +02:00
commit 4728677e80
45 changed files with 171 additions and 540 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -30,7 +30,7 @@
[ext_resource type="Material" uid="uid://c47ulvm6n2tgk" path="res://textures/Floors/Floor228.tres" id="19_ue087"]
[ext_resource type="Material" uid="uid://bchj40rv0q85g" path="res://textures/Floors/Floor255.tres" id="20_4fwvw"]
[ext_resource type="Material" uid="uid://dnegblycwcpc8" path="res://textures/Manual/Blue_Panel_Wall.tres" id="20_aae8v"]
[ext_resource type="Material" path="res://textures/Manual/Chevron.tres" id="20_r2p4f"]
[ext_resource type="Material" uid="uid://dfs1tc2ry78pb" path="res://textures/Manual/Chevron.tres" id="20_r2p4f"]
[ext_resource type="Material" uid="uid://bh0uo0cm3cr15" path="res://textures/Various/Various6.tres" id="21_81m4u"]
[ext_resource type="Material" uid="uid://kdc67iah8mtf" path="res://textures/Manual/Glass_002.tres" id="21_c8lhx"]
[ext_resource type="Material" uid="uid://crk5xgfn3svey" path="res://textures/Floors/Floor178.tres" id="21_cr7d0"]
@ -4591,6 +4591,7 @@ metadata/_tb_type = "_tb_layer"
[node name="entity_264_func_shroud" type="StaticBody3D" parent="FuncGodotMap/layer_1_Shrouds"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 22.75, 0.53125, -5.25)
visible = false
script = ExtResource("96_pioc6")
TargetName = "secret_door_1"
OneTime = true
@ -4606,6 +4607,7 @@ occluder = SubResource("ArrayOccluder3D_jxd7w")
[node name="entity_265_func_shroud" type="StaticBody3D" parent="FuncGodotMap/layer_1_Shrouds"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 17.75, 0.53125, -7.875)
visible = false
script = ExtResource("96_pioc6")
TargetName = "secret_door_1"
OneTime = true
@ -4621,6 +4623,7 @@ occluder = SubResource("ArrayOccluder3D_duyn0")
[node name="entity_266_func_shroud" type="StaticBody3D" parent="FuncGodotMap/layer_1_Shrouds"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -12.25, 3.03125, 19)
visible = false
script = ExtResource("96_pioc6")
TargetName = "door5"
OneTime = true
@ -4636,6 +4639,7 @@ occluder = SubResource("ArrayOccluder3D_11fj7")
[node name="entity_267_func_shroud" type="StaticBody3D" parent="FuncGodotMap/layer_1_Shrouds"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12.375, 0.53125, -7.875)
visible = false
script = ExtResource("96_pioc6")
TargetName = "secret_door_1"
OneTime = true
@ -4651,6 +4655,7 @@ occluder = SubResource("ArrayOccluder3D_h4q2n")
[node name="entity_268_func_shroud" type="StaticBody3D" parent="FuncGodotMap/layer_1_Shrouds"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 17.75, 0.53125, -2.375)
visible = false
script = ExtResource("96_pioc6")
TargetName = "secret_door_2"
OneTime = true

View file

@ -1,20 +1,44 @@
[gd_scene load_steps=5 format=3 uid="uid://br01ww57uaky5"]
[gd_scene load_steps=8 format=3 uid="uid://br01ww57uaky5"]
[ext_resource type="Script" uid="uid://ccxnvbthsvka3" path="res://Scripts/Actors/Destructible3D.cs" id="1_hsg1w"]
[ext_resource type="PackedScene" uid="uid://hxn4awevjyui" path="res://3D/BlockbenchModels/Box/Box_Blue.gltf" id="1_ropdl"]
[ext_resource type="Resource" uid="uid://bes254wblt1lm" path="res://Resources/Bullets/3D/Explosion_Harmless_Small_3D.tres" id="2_cn5xh"]
[ext_resource type="Script" uid="uid://ddsqqfx1usc3j" path="res://Scripts/Resources/DamageResistance.cs" id="3_kh78t"]
[ext_resource type="Script" uid="uid://hkmutmmjqh1e" path="res://Scripts/Actors/3D/PropGravityModule3D.cs" id="5_0ktp8"]
[sub_resource type="BoxShape3D" id="BoxShape3D_hsg1w"]
size = Vector3(0.763428, 0.469452, 0.77832)
[sub_resource type="BoxShape3D" id="BoxShape3D_0ktp8"]
size = Vector3(0.60668945, 0.09439087, 0.595726)
[node name="BoxBlue" type="StaticBody3D" groups=["Destroyable"]]
collision_layer = 16
collision_mask = 0
axis_lock_linear_x = true
axis_lock_linear_z = true
axis_lock_angular_x = true
axis_lock_angular_y = true
axis_lock_angular_z = true
script = ExtResource("1_hsg1w")
ExplosionData = ExtResource("2_cn5xh")
DamageResistances = Array[ExtResource("3_kh78t")]([])
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00549316, 0.0253752, -0.000488281)
shape = SubResource("BoxShape3D_hsg1w")
[node name="blockbench_export" parent="." instance=ExtResource("1_ropdl")]
[node name="Node" type="Area3D" parent="."]
collision_layer = 0
collision_mask = 17
script = ExtResource("5_0ktp8")
FallingSpeed = -2.0
[node name="CollisionShape3D" type="CollisionShape3D" parent="Node"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.024291992, -0.19599915, 0.013088226)
shape = SubResource("BoxShape3D_0ktp8")
[connection signal="body_entered" from="Node" to="Node" method="OnBodyEntered"]
[connection signal="body_exited" from="Node" to="Node" method="OnBodyExited"]

View file

@ -1,20 +1,39 @@
[gd_scene load_steps=5 format=3 uid="uid://c8wwioforxms3"]
[gd_scene load_steps=8 format=3 uid="uid://c8wwioforxms3"]
[ext_resource type="PackedScene" uid="uid://c5k6rsawax3gf" path="res://3D/BlockbenchModels/Box/Box_Green.gltf" id="1_03sp0"]
[ext_resource type="Script" uid="uid://ccxnvbthsvka3" path="res://Scripts/Actors/Destructible3D.cs" id="1_e6kl3"]
[ext_resource type="Resource" uid="uid://bes254wblt1lm" path="res://Resources/Bullets/3D/Explosion_Harmless_Small_3D.tres" id="2_bguu7"]
[ext_resource type="Script" uid="uid://ddsqqfx1usc3j" path="res://Scripts/Resources/DamageResistance.cs" id="3_fntiw"]
[ext_resource type="Script" uid="uid://hkmutmmjqh1e" path="res://Scripts/Actors/3D/PropGravityModule3D.cs" id="5_jb4do"]
[sub_resource type="BoxShape3D" id="BoxShape3D_hsg1w"]
size = Vector3(0.763428, 0.469452, 0.77832)
[sub_resource type="BoxShape3D" id="BoxShape3D_6tetb"]
size = Vector3(0.60668945, 0.09439087, 0.595726)
[node name="BoxBlue" type="StaticBody3D" groups=["Destroyable"]]
collision_layer = 16
collision_mask = 0
script = ExtResource("1_e6kl3")
ExplosionData = ExtResource("2_bguu7")
DamageResistances = Array[ExtResource("3_fntiw")]([])
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00549316, 0.0253752, -0.000488281)
shape = SubResource("BoxShape3D_hsg1w")
[node name="blockbench_export" parent="." instance=ExtResource("1_03sp0")]
[node name="Node" type="Area3D" parent="."]
collision_layer = 0
collision_mask = 17
script = ExtResource("5_jb4do")
FallingSpeed = -2.0
[node name="CollisionShape3D" type="CollisionShape3D" parent="Node"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.024291992, -0.19599915, 0.013088226)
shape = SubResource("BoxShape3D_6tetb")
[connection signal="body_entered" from="Node" to="Node" method="OnBodyEntered"]
[connection signal="body_exited" from="Node" to="Node" method="OnBodyExited"]

View file

@ -1,20 +1,39 @@
[gd_scene load_steps=5 format=3 uid="uid://jffyxmft3nbw"]
[gd_scene load_steps=8 format=3 uid="uid://jffyxmft3nbw"]
[ext_resource type="PackedScene" uid="uid://ninnis3a3jbn" path="res://3D/BlockbenchModels/Box/Box_Red.gltf" id="1_fi646"]
[ext_resource type="Script" uid="uid://ccxnvbthsvka3" path="res://Scripts/Actors/Destructible3D.cs" id="1_kvqx7"]
[ext_resource type="Resource" uid="uid://bes254wblt1lm" path="res://Resources/Bullets/3D/Explosion_Harmless_Small_3D.tres" id="2_jolck"]
[ext_resource type="Script" uid="uid://ddsqqfx1usc3j" path="res://Scripts/Resources/DamageResistance.cs" id="3_7px86"]
[ext_resource type="Script" uid="uid://hkmutmmjqh1e" path="res://Scripts/Actors/3D/PropGravityModule3D.cs" id="5_qq3cg"]
[sub_resource type="BoxShape3D" id="BoxShape3D_hsg1w"]
size = Vector3(0.763428, 0.469452, 0.77832)
[sub_resource type="BoxShape3D" id="BoxShape3D_hlryi"]
size = Vector3(0.60668945, 0.09439087, 0.595726)
[node name="BoxRed" type="StaticBody3D" groups=["Destroyable"]]
collision_layer = 16
collision_mask = 0
script = ExtResource("1_kvqx7")
ExplosionData = ExtResource("2_jolck")
DamageResistances = Array[ExtResource("3_7px86")]([])
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00549316, 0.0253752, -0.000488281)
shape = SubResource("BoxShape3D_hsg1w")
[node name="blockbench_export" parent="." instance=ExtResource("1_fi646")]
[node name="Node" type="Area3D" parent="."]
collision_layer = 0
collision_mask = 17
script = ExtResource("5_qq3cg")
FallingSpeed = -2.0
[node name="CollisionShape3D" type="CollisionShape3D" parent="Node"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.024291992, -0.19599915, 0.013088226)
shape = SubResource("BoxShape3D_hlryi")
[connection signal="body_entered" from="Node" to="Node" method="OnBodyEntered"]
[connection signal="body_exited" from="Node" to="Node" method="OnBodyExited"]

View file

@ -1,20 +1,39 @@
[gd_scene load_steps=5 format=3 uid="uid://c6cdl3y3i3axl"]
[gd_scene load_steps=8 format=3 uid="uid://c6cdl3y3i3axl"]
[ext_resource type="PackedScene" uid="uid://cpwolnoq46foq" path="res://3D/BlockbenchModels/Box/Box_Yellow.gltf" id="1_0rxnx"]
[ext_resource type="Script" uid="uid://ccxnvbthsvka3" path="res://Scripts/Actors/Destructible3D.cs" id="1_l0sp5"]
[ext_resource type="Resource" uid="uid://bes254wblt1lm" path="res://Resources/Bullets/3D/Explosion_Harmless_Small_3D.tres" id="2_1if0l"]
[ext_resource type="Script" uid="uid://ddsqqfx1usc3j" path="res://Scripts/Resources/DamageResistance.cs" id="3_6qeec"]
[ext_resource type="Script" uid="uid://hkmutmmjqh1e" path="res://Scripts/Actors/3D/PropGravityModule3D.cs" id="5_njaax"]
[sub_resource type="BoxShape3D" id="BoxShape3D_hsg1w"]
size = Vector3(0.763428, 0.469452, 0.77832)
[sub_resource type="BoxShape3D" id="BoxShape3D_ntpiq"]
size = Vector3(0.60668945, 0.09439087, 0.595726)
[node name="BoxBlue" type="StaticBody3D" groups=["Destroyable"]]
collision_layer = 16
collision_mask = 0
script = ExtResource("1_l0sp5")
ExplosionData = ExtResource("2_1if0l")
DamageResistances = Array[ExtResource("3_6qeec")]([])
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00549316, 0.0253752, -0.000488281)
shape = SubResource("BoxShape3D_hsg1w")
[node name="blockbench_export" parent="." instance=ExtResource("1_0rxnx")]
[node name="Node" type="Area3D" parent="."]
collision_layer = 0
collision_mask = 17
script = ExtResource("5_njaax")
FallingSpeed = -2.0
[node name="CollisionShape3D" type="CollisionShape3D" parent="Node"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.024291992, -0.19599915, 0.013088226)
shape = SubResource("BoxShape3D_ntpiq")
[connection signal="body_entered" from="Node" to="Node" method="OnBodyEntered"]
[connection signal="body_exited" from="Node" to="Node" method="OnBodyExited"]

View file

@ -1,20 +1,40 @@
[gd_scene load_steps=5 format=3 uid="uid://d2kqcbr5rufxb"]
[gd_scene load_steps=8 format=3 uid="uid://d2kqcbr5rufxb"]
[ext_resource type="PackedScene" uid="uid://etmm2bm8mj06" path="res://3D/BlockbenchModels/WoodenBox/Wooden_Box.gltf" id="1_2t24b"]
[ext_resource type="Script" uid="uid://ccxnvbthsvka3" path="res://Scripts/Actors/Destructible3D.cs" id="1_nnmn3"]
[ext_resource type="Resource" uid="uid://bes254wblt1lm" path="res://Resources/Bullets/3D/Explosion_Harmless_Small_3D.tres" id="2_5j3e2"]
[ext_resource type="Script" uid="uid://ddsqqfx1usc3j" path="res://Scripts/Resources/DamageResistance.cs" id="3_cyk87"]
[ext_resource type="Script" uid="uid://hkmutmmjqh1e" path="res://Scripts/Actors/3D/PropGravityModule3D.cs" id="5_81jt2"]
[sub_resource type="BoxShape3D" id="BoxShape3D_hsg1w"]
size = Vector3(1, 0.498138, 0.543457)
[node name="BoxTest" type="StaticBody3D" groups=["Destroyable"]]
[sub_resource type="BoxShape3D" id="BoxShape3D_1v1bv"]
size = Vector3(0.60668945, 0.1053009, 0.49469566)
[node name="WoodenBox" type="StaticBody3D" groups=["Destroyable"]]
collision_layer = 16
collision_mask = 0
script = ExtResource("1_nnmn3")
Health = 4.0
ExplosionData = ExtResource("2_5j3e2")
DamageResistances = Array[ExtResource("3_cyk87")]([])
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.0022127, -0.0178223)
shape = SubResource("BoxShape3D_hsg1w")
[node name="blockbench_export" parent="." instance=ExtResource("1_2t24b")]
[node name="Node" type="Area3D" parent="."]
collision_layer = 0
collision_mask = 17
script = ExtResource("5_81jt2")
FallingSpeed = -2.0
[node name="CollisionShape3D" type="CollisionShape3D" parent="Node"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.024291992, -0.20145416, -0.0007390976)
shape = SubResource("BoxShape3D_1v1bv")
[connection signal="body_entered" from="Node" to="Node" method="OnBodyEntered"]
[connection signal="body_exited" from="Node" to="Node" method="OnBodyExited"]

View file

@ -23,12 +23,25 @@ public partial class FuncShroud : StaticBody3D, IActivable
public override void _Ready()
{
if (Engine.IsEditorHint()) return;
if (Engine.IsEditorHint())
{
HideShroud();
return;
};
if (!string.IsNullOrWhiteSpace(TargetName))
{
this.AddToGroup(TargetName);
}
if (_enabled)
{
ShowShroud();
}
else
{
HideShroud();
}
}
public bool Activate(ActivationType activationType = ActivationType.Toggle)

View file

@ -5,11 +5,11 @@
[ext_resource type="Resource" uid="uid://ca7377sfgj074" path="res://addons/func_godot/game_config/trenchbroom/tb_face_tag_skip.tres" id="2_xq8pd"]
[ext_resource type="Resource" uid="uid://bkjxc54mmdhbo" path="res://addons/func_godot/game_config/trenchbroom/tb_face_tag_origin.tres" id="3_sgien"]
[ext_resource type="Resource" uid="uid://cxqi6r6nblcn3" path="res://3D/TrenchBroom/fgd_main.tres" id="4_fiwv4"]
[ext_resource type="Texture2D" uid="uid://decwujsyhj0qy" path="res://addons/func_godot/icon32.png" id="5_0tw2g"]
[ext_resource type="Resource" uid="uid://bdmexobfdwk12" path="res://3D/TrenchBroom/Tags/glass_tag.tres" id="5_lswco"]
[ext_resource type="Script" uid="uid://cfpnvyygr4pb5" path="res://addons/func_godot/src/trenchbroom/trenchbroom_game_config.gd" id="6_478qb"]
[ext_resource type="Resource" uid="uid://chysqo5rdd5p" path="res://3D/TrenchBroom/Tags/test_glass_tag.tres" id="6_lswco"]
[ext_resource type="Resource" uid="uid://b8kujhnu10hyc" path="res://3D/TrenchBroom/Tags/func_shroud_tag.tres" id="7_jsm6j"]
[ext_resource type="Texture2D" uid="uid://decwujsyhj0qy" path="res://addons/func_godot/icon32.png" id="9_jsm6j"]
[resource]
script = ExtResource("6_478qb")