Beast spawn point logic

This commit is contained in:
Rob Kelly 2025-09-05 23:14:47 -06:00
parent 047a5557f4
commit 1f8ebbdf8e
52 changed files with 714 additions and 70 deletions

View File

@ -5,8 +5,9 @@ extends Node3D
func spawn() -> void: func spawn() -> void:
despawn() despawn()
var instance: Node3D = beast_scene.instantiate() var instance: GrunkBeast = beast_scene.instantiate()
add_child(instance) add_child(instance)
instance.start_spawn()
func despawn() -> void: func despawn() -> void:

View File

@ -52,6 +52,15 @@ func spawn_alarm() -> void:
_do_spawn(alarm_spawn_point, alarm_scene) _do_spawn(alarm_spawn_point, alarm_scene)
func spawn_beast() -> void:
var spawners := get_tree().get_nodes_in_group(BeastSpawner.GROUP)
if spawners:
var spawner: BeastSpawner = spawners.pick_random()
spawner.do_spawn()
else:
print_debug("No spawners available!")
func trigger_spawned_alarm() -> void: func trigger_spawned_alarm() -> void:
var alarm := alarm_spawn_point.get_child(0) as GunkAlarm var alarm := alarm_spawn_point.get_child(0) as GunkAlarm
if alarm: if alarm:

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=31 format=4 uid="uid://b8rv6dg4tgaeb"] [gd_scene load_steps=41 format=4 uid="uid://b8rv6dg4tgaeb"]
[ext_resource type="Script" uid="uid://bvua1l2hb3an6" path="res://levels/mechanic_test/mechanic_test.gd" id="1_iyuyb"] [ext_resource type="Script" uid="uid://bvua1l2hb3an6" path="res://levels/mechanic_test/mechanic_test.gd" id="1_iyuyb"]
[ext_resource type="PackedScene" uid="uid://bwe2jdmvinhqd" path="res://src/player/player.tscn" id="2_qjnj2"] [ext_resource type="PackedScene" uid="uid://bwe2jdmvinhqd" path="res://src/player/player.tscn" id="2_qjnj2"]
@ -11,7 +11,11 @@
[ext_resource type="PackedScene" uid="uid://b5jubpjj3d277" path="res://levels/mechanic_test/signal_test.tscn" id="9_ix0jw"] [ext_resource type="PackedScene" uid="uid://b5jubpjj3d277" path="res://levels/mechanic_test/signal_test.tscn" id="9_ix0jw"]
[ext_resource type="PackedScene" uid="uid://cfqirm2o3uo4k" path="res://levels/mechanic_test/prop_test.tscn" id="10_xrfi2"] [ext_resource type="PackedScene" uid="uid://cfqirm2o3uo4k" path="res://levels/mechanic_test/prop_test.tscn" id="10_xrfi2"]
[ext_resource type="PackedScene" uid="uid://dbabcsp38wmid" path="res://levels/mechanic_test/item_test.tscn" id="11_8natv"] [ext_resource type="PackedScene" uid="uid://dbabcsp38wmid" path="res://levels/mechanic_test/item_test.tscn" id="11_8natv"]
[ext_resource type="ArrayMesh" uid="uid://dpr5cgq743f4s" path="res://assets/level/floor/floor_9x9.mesh" id="13_aix42"]
[ext_resource type="PackedScene" uid="uid://kctp5erogwcb" path="res://src/world/mechanics/listener/listener.tscn" id="13_awnx0"] [ext_resource type="PackedScene" uid="uid://kctp5erogwcb" path="res://src/world/mechanics/listener/listener.tscn" id="13_awnx0"]
[ext_resource type="PackedScene" uid="uid://c8vbjgol5nenc" path="res://src/world/grunk_beast/beast_spawner/floor_spawner.tscn" id="13_cgmn0"]
[ext_resource type="PackedScene" uid="uid://5vh7mnjavlle" path="res://src/world/grunk_beast/beast_spawner/transient_floor_spawner.tscn" id="15_6frcc"]
[ext_resource type="PackedScene" uid="uid://drm5dspi48pf5" path="res://src/props/crate_long/phys_crate_long.tscn" id="15_aix42"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_goufh"] [sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_goufh"]
@ -99,6 +103,31 @@ shadow_mesh = SubResource("ArrayMesh_0j1ke")
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_qjnj2"] [sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_qjnj2"]
data = PackedVector3Array(-1.5, 0, -6, -1.5, 0, 6, -1.5, 3, -6, -1.5, 3, -6, -1.5, 0, 6, -1.5, 3, 6, 1.5, 0, 6, 1.5, 0, -6, 1.5, 3, 6, 1.5, 3, 6, 1.5, 0, -6, 1.5, 3, -6, -1.5, 0, 6, -1.5, 0, -6, 1.5, 0, 6, 1.5, 0, 6, -1.5, 0, -6, 1.5, 0, -6, 1.5, 3, 6, 1.5, 3, -6, -1.5, 3, 6, -1.5, 3, 6, 1.5, 3, -6, -1.5, 3, -6) data = PackedVector3Array(-1.5, 0, -6, -1.5, 0, 6, -1.5, 3, -6, -1.5, 3, -6, -1.5, 0, 6, -1.5, 3, 6, 1.5, 0, 6, 1.5, 0, -6, 1.5, 3, 6, 1.5, 3, 6, 1.5, 0, -6, 1.5, 3, -6, -1.5, 0, 6, -1.5, 0, -6, 1.5, 0, 6, 1.5, 0, 6, -1.5, 0, -6, 1.5, 0, -6, 1.5, 3, 6, 1.5, 3, -6, -1.5, 3, 6, -1.5, 3, 6, 1.5, 3, -6, -1.5, 3, -6)
[sub_resource type="BoxShape3D" id="BoxShape3D_qjnj2"]
size = Vector3(3, 4.24365, 0.1)
[sub_resource type="BoxShape3D" id="BoxShape3D_awnx0"]
size = Vector3(3, 0.1, 0.354736)
[sub_resource type="BoxMesh" id="BoxMesh_qjnj2"]
size = Vector3(20, 3, 2)
[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_awnx0"]
points = PackedVector3Array(10, 1.5, 1, 10, 1.5, -1, -10, 1.5, 1, 10, -1.5, 1, 10, -1.5, -1, -10, 1.5, -1, -10, -1.5, 1, -10, -1.5, -1)
[sub_resource type="NavigationMesh" id="NavigationMesh_cgmn0"]
vertices = PackedVector3Array(8, 0.411087, 8.74848, 10.25, 0.411087, 8.74848, 10.25, 0.411087, 6.49848, -5, 0.411087, -4.75152, -5, 3.16109, -7.75152, -6.25, 3.16109, -7.75152, -6.25, 0.411087, -3.75152, -5, 0.911087, -5.75152, -6.25, 0.411087, -5.08485, 2, 0.411087, 8.74848, 10.25, 0.411087, 4.49848, 10.25, 0.411087, 0.498482, 6.75, 0.411087, -7.75152, -3, 0.411087, -4.75152, -6.25, 0.411087, 4.49848, -4.5, 0.411087, -4.25152, -6.25, 0.411087, -1.75152, -0.25, 0.411087, 8.74848, 0.25, 0.411087, -7.75152, -3, 0.411087, -7.75152, -6.25, 0.411087, 0.498482, -6.25, 0.411087, 6.49848, -6.25, 0.411087, 8.74848, -2.25, 0.411087, 8.74848, 6, 0.411087, 8.74848, 10.25, 0.411087, -3.75152, 10.25, 0.411087, -7.75152, 10.25, 0.411087, -1.75152, 3.5, 0.411087, -7.75152)
polygons = [PackedInt32Array(2, 1, 0), PackedInt32Array(6, 8, 3), PackedInt32Array(3, 8, 7), PackedInt32Array(7, 8, 4), PackedInt32Array(4, 8, 5), PackedInt32Array(10, 9, 11), PackedInt32Array(11, 9, 12), PackedInt32Array(12, 9, 13), PackedInt32Array(13, 9, 14), PackedInt32Array(3, 15, 6), PackedInt32Array(6, 15, 16), PackedInt32Array(9, 17, 14), PackedInt32Array(13, 19, 18), PackedInt32Array(15, 13, 16), PackedInt32Array(16, 13, 20), PackedInt32Array(23, 22, 21), PackedInt32Array(2, 0, 24), PackedInt32Array(12, 26, 25), PackedInt32Array(21, 14, 23), PackedInt32Array(23, 14, 17), PackedInt32Array(2, 24, 10), PackedInt32Array(10, 24, 9), PackedInt32Array(14, 20, 13), PackedInt32Array(12, 25, 27), PackedInt32Array(13, 18, 28), PackedInt32Array(13, 28, 12), PackedInt32Array(12, 27, 11)]
geometry_parsed_geometry_type = 1
geometry_collision_mask = 4278190081
agent_height = 2.0
agent_radius = 0.75
region_min_size = 14.0
edge_max_length = 4.0
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_6frcc"]
data = PackedVector3Array(4.5, 0, 4.5, -4.5, 0, 4.5, 4.5, 0, -4.5, 4.5, 0, -4.5, -4.5, 0, 4.5, -4.5, 0, -4.5)
[node name="MechanicTest" type="Node3D"] [node name="MechanicTest" type="Node3D"]
script = ExtResource("1_iyuyb") script = ExtResource("1_iyuyb")
id = "mechanic_test" id = "mechanic_test"
@ -217,39 +246,6 @@ label = "Level"
verb = "spawn alarm" verb = "spawn alarm"
metadata/_custom_type_script = "uid://deg5xd87cy8rg" metadata/_custom_type_script = "uid://deg5xd87cy8rg"
[node name="AlarmTrigger" type="StaticBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.5, 1, -6)
collision_layer = 5
[node name="MeshInstance3D" type="MeshInstance3D" parent="AlarmTrigger"]
mesh = SubResource("BoxMesh_goufh")
[node name="CollisionShape3D" type="CollisionShape3D" parent="AlarmTrigger"]
shape = SubResource("ConcavePolygonShape3D_bg05n")
[node name="Label3D" type="Label3D" parent="AlarmTrigger"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0.3)
text = "Trigger"
[node name="ButtonMesh" type="MeshInstance3D" parent="AlarmTrigger"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.4, 0.25)
mesh = SubResource("SphereMesh_awnx0")
skeleton = NodePath("")
[node name="InteractiveBody" type="StaticBody3D" parent="AlarmTrigger/ButtonMesh"]
collision_layer = 2
collision_mask = 0
[node name="CollisionShape3D" type="CollisionShape3D" parent="AlarmTrigger/ButtonMesh/InteractiveBody"]
shape = SubResource("SphereShape3D_cgmn0")
[node name="Interactive" type="Node" parent="AlarmTrigger/ButtonMesh/InteractiveBody"]
script = ExtResource("4_qjnj2")
enabled = true
label = "Level"
verb = "trigger alarm"
metadata/_custom_type_script = "uid://deg5xd87cy8rg"
[node name="GunkHall" type="MeshInstance3D" parent="."] [node name="GunkHall" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.5, 0, -31) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.5, 0, -31)
mesh = SubResource("ArrayMesh_x2vho") mesh = SubResource("ArrayMesh_x2vho")
@ -332,13 +328,477 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -13, 0, -2)
[node name="Listener" parent="." instance=ExtResource("13_awnx0")] [node name="Listener" parent="." instance=ExtResource("13_awnx0")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 16.5, 0, -6.5) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 16.5, 0, -6.5)
[node name="BeastPit" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.001, 26)
[node name="Structure" type="Node3D" parent="BeastPit"]
[node name="Stairs" type="Node3D" parent="BeastPit/Structure"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.200001)
[node name="Steps" type="CSGCombiner3D" parent="BeastPit/Structure/Stairs"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -2.7)
use_collision = true
collision_layer = 68
collision_mask = 0
[node name="CSGBox3D" type="CSGBox3D" parent="BeastPit/Structure/Stairs/Steps"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -1.8)
size = Vector3(3, 0.1, 0.4)
[node name="CSGBox3D2" type="CSGBox3D" parent="BeastPit/Structure/Stairs/Steps"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.3, -1.5)
size = Vector3(3, 0.1, 0.4)
[node name="CSGBox3D3" type="CSGBox3D" parent="BeastPit/Structure/Stairs/Steps"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.6, -1.2)
size = Vector3(3, 0.1, 0.4)
[node name="CSGBox3D4" type="CSGBox3D" parent="BeastPit/Structure/Stairs/Steps"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.9, -0.899994)
size = Vector3(3, 0.1, 0.4)
[node name="CSGBox3D5" type="CSGBox3D" parent="BeastPit/Structure/Stairs/Steps"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.2, -0.599991)
size = Vector3(3, 0.1, 0.4)
[node name="CSGBox3D6" type="CSGBox3D" parent="BeastPit/Structure/Stairs/Steps"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, -0.299988)
size = Vector3(3, 0.1, 0.4)
[node name="CSGBox3D7" type="CSGBox3D" parent="BeastPit/Structure/Stairs/Steps"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.8, 1.52588e-05)
size = Vector3(3, 0.1, 0.4)
[node name="CSGBox3D8" type="CSGBox3D" parent="BeastPit/Structure/Stairs/Steps"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.1, 0.300018)
size = Vector3(3, 0.1, 0.4)
[node name="CSGBox3D9" type="CSGBox3D" parent="BeastPit/Structure/Stairs/Steps"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.4, 0.600021)
size = Vector3(3, 0.1, 0.4)
[node name="CSGBox3D10" type="CSGBox3D" parent="BeastPit/Structure/Stairs/Steps"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.7, 0.900024)
size = Vector3(3, 0.1, 0.4)
[node name="CSGBox3D11" type="CSGBox3D" parent="BeastPit/Structure/Stairs/Steps"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.95, 1.25045)
size = Vector3(3, 0.1, 0.5)
[node name="StaticBody3D" type="StaticBody3D" parent="BeastPit/Structure/Stairs/Steps"]
collision_mask = 0
[node name="CollisionShape3D" type="CollisionShape3D" parent="BeastPit/Structure/Stairs/Steps/StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 0.707107, -0.707107, 0, 0.707107, 0.707107, 0, 1.4468, -0.353196)
shape = SubResource("BoxShape3D_qjnj2")
[node name="CollisionShape3D2" type="CollisionShape3D" parent="BeastPit/Structure/Stairs/Steps/StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.95, 1.32415)
shape = SubResource("BoxShape3D_awnx0")
[node name="Bannister" type="CSGCombiner3D" parent="BeastPit/Structure/Stairs"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -2.7)
use_collision = true
collision_layer = 5
collision_mask = 0
[node name="CSGBox3D12" type="CSGBox3D" parent="BeastPit/Structure/Stairs/Bannister"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.5, 0.5, -1.8)
size = Vector3(0.1, 1, 0.2)
[node name="CSGBox3D13" type="CSGBox3D" parent="BeastPit/Structure/Stairs/Bannister"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.5, 3.5, 1.2)
size = Vector3(0.1, 1, 0.2)
[node name="CSGBox3D14" type="CSGBox3D" parent="BeastPit/Structure/Stairs/Bannister"]
transform = Transform3D(1, 0, 0, 0, 0.707107, -0.707107, 0, 0.707107, 0.707107, -1.5, 2.42865, -0.329697)
size = Vector3(0.1, 4.23, 0.2)
[node name="Bannister2" type="CSGCombiner3D" parent="BeastPit/Structure/Stairs"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3, 0, -2.7)
use_collision = true
collision_layer = 5
collision_mask = 0
[node name="CSGBox3D12" type="CSGBox3D" parent="BeastPit/Structure/Stairs/Bannister2"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.5, 0.5, -1.8)
size = Vector3(0.1, 1, 0.2)
[node name="CSGBox3D13" type="CSGBox3D" parent="BeastPit/Structure/Stairs/Bannister2"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.5, 3.5, 1.2)
size = Vector3(0.1, 1, 0.2)
[node name="CSGBox3D14" type="CSGBox3D" parent="BeastPit/Structure/Stairs/Bannister2"]
transform = Transform3D(1, 0, 0, 0, 0.707107, -0.707107, 0, 0.707107, 0.707107, -1.5, 2.42865, -0.329697)
size = Vector3(0.1, 4.23, 0.2)
[node name="Walls" type="Node3D" parent="BeastPit/Structure"]
[node name="Wall" type="MeshInstance3D" parent="BeastPit/Structure/Walls"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1.5, 0)
mesh = SubResource("BoxMesh_qjnj2")
skeleton = NodePath("../../..")
[node name="StaticBody3D" type="StaticBody3D" parent="BeastPit/Structure/Walls/Wall"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="BeastPit/Structure/Walls/Wall/StaticBody3D"]
shape = SubResource("ConvexPolygonShape3D_awnx0")
[node name="Wall4" type="MeshInstance3D" parent="BeastPit/Structure/Walls"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3, 1.5, 20)
mesh = SubResource("BoxMesh_qjnj2")
skeleton = NodePath("../../..")
[node name="StaticBody3D" type="StaticBody3D" parent="BeastPit/Structure/Walls/Wall4"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="BeastPit/Structure/Walls/Wall4/StaticBody3D"]
shape = SubResource("ConvexPolygonShape3D_awnx0")
[node name="Wall2" type="MeshInstance3D" parent="BeastPit/Structure/Walls"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -8, 1.5, 11)
mesh = SubResource("BoxMesh_qjnj2")
skeleton = NodePath("../../..")
[node name="StaticBody3D" type="StaticBody3D" parent="BeastPit/Structure/Walls/Wall2"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="BeastPit/Structure/Walls/Wall2/StaticBody3D"]
shape = SubResource("ConvexPolygonShape3D_awnx0")
[node name="Wall3" type="MeshInstance3D" parent="BeastPit/Structure/Walls"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 12, 1.5, 9)
mesh = SubResource("BoxMesh_qjnj2")
skeleton = NodePath("../../..")
[node name="StaticBody3D" type="StaticBody3D" parent="BeastPit/Structure/Walls/Wall3"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="BeastPit/Structure/Walls/Wall3/StaticBody3D"]
shape = SubResource("ConvexPolygonShape3D_awnx0")
[node name="NavigationRegion3D" type="NavigationRegion3D" parent="BeastPit/Structure"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 9.5)
navigation_mesh = SubResource("NavigationMesh_cgmn0")
[node name="Floor" type="MeshInstance3D" parent="BeastPit/Structure/NavigationRegion3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.5, 0, -4)
mesh = ExtResource("13_aix42")
skeleton = NodePath("")
[node name="StaticBody3D" type="StaticBody3D" parent="BeastPit/Structure/NavigationRegion3D/Floor"]
collision_layer = 5
collision_mask = 0
[node name="CollisionShape3D" type="CollisionShape3D" parent="BeastPit/Structure/NavigationRegion3D/Floor/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_6frcc")
[node name="Gunkable" parent="BeastPit/Structure/NavigationRegion3D/Floor/StaticBody3D" node_paths=PackedStringArray("body", "mesh_instance") instance=ExtResource("8_awnx0")]
body = NodePath("..")
mesh_instance = NodePath("../..")
source_gunk_material = ExtResource("7_qjnj2")
[node name="Floor2" type="MeshInstance3D" parent="BeastPit/Structure/NavigationRegion3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6.5, 0, -4)
mesh = ExtResource("13_aix42")
skeleton = NodePath("")
[node name="StaticBody3D" type="StaticBody3D" parent="BeastPit/Structure/NavigationRegion3D/Floor2"]
collision_layer = 5
collision_mask = 0
[node name="CollisionShape3D" type="CollisionShape3D" parent="BeastPit/Structure/NavigationRegion3D/Floor2/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_6frcc")
[node name="Gunkable" parent="BeastPit/Structure/NavigationRegion3D/Floor2/StaticBody3D" node_paths=PackedStringArray("body", "mesh_instance") instance=ExtResource("8_awnx0")]
body = NodePath("..")
mesh_instance = NodePath("../..")
source_gunk_material = ExtResource("7_qjnj2")
[node name="Floor3" type="MeshInstance3D" parent="BeastPit/Structure/NavigationRegion3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.5, 0, 5)
mesh = ExtResource("13_aix42")
skeleton = NodePath("")
[node name="StaticBody3D" type="StaticBody3D" parent="BeastPit/Structure/NavigationRegion3D/Floor3"]
collision_layer = 5
collision_mask = 0
[node name="CollisionShape3D" type="CollisionShape3D" parent="BeastPit/Structure/NavigationRegion3D/Floor3/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_6frcc")
[node name="Gunkable" parent="BeastPit/Structure/NavigationRegion3D/Floor3/StaticBody3D" node_paths=PackedStringArray("body", "mesh_instance") instance=ExtResource("8_awnx0")]
body = NodePath("..")
mesh_instance = NodePath("../..")
source_gunk_material = ExtResource("7_qjnj2")
[node name="Floor4" type="MeshInstance3D" parent="BeastPit/Structure/NavigationRegion3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6.5, 0, 5)
mesh = ExtResource("13_aix42")
skeleton = NodePath("")
[node name="StaticBody3D" type="StaticBody3D" parent="BeastPit/Structure/NavigationRegion3D/Floor4"]
collision_layer = 5
collision_mask = 0
[node name="CollisionShape3D" type="CollisionShape3D" parent="BeastPit/Structure/NavigationRegion3D/Floor4/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_6frcc")
[node name="Gunkable" parent="BeastPit/Structure/NavigationRegion3D/Floor4/StaticBody3D" node_paths=PackedStringArray("body", "mesh_instance") instance=ExtResource("8_awnx0")]
body = NodePath("..")
mesh_instance = NodePath("../..")
source_gunk_material = ExtResource("7_qjnj2")
[node name="Spawners" type="Node3D" parent="BeastPit/Structure/NavigationRegion3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -9.5)
[node name="FloorSpawner" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("13_cgmn0")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 4.5)
[node name="TransientFloorSpawner" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3, 0, 13)
[node name="TransientFloorSpawner2" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4, 0, 15)
[node name="TransientFloorSpawner3" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.5, 0, 14.5)
[node name="TransientFloorSpawner4" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 0, 16)
[node name="TransientFloorSpawner5" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.5, 0, 16.5)
[node name="TransientFloorSpawner6" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 0, 17)
[node name="TransientFloorSpawner7" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.5, 0, 16.5)
[node name="TransientFloorSpawner8" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 16)
[node name="TransientFloorSpawner9" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1, 0, 14.5)
[node name="TransientFloorSpawner10" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 14)
[node name="TransientFloorSpawner11" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.5, 0, 14.5)
[node name="TransientFloorSpawner12" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3, 0, 16.5)
[node name="TransientFloorSpawner13" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.5, 0, 17.5)
[node name="TransientFloorSpawner14" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4.5, 0, 15.5)
[node name="TransientFloorSpawner15" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4.5, 0, 17.5)
[node name="TransientFloorSpawner16" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 0, 16.5)
[node name="TransientFloorSpawner17" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 0, 14.5)
[node name="TransientFloorSpawner18" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 7.5, 0, 17.5)
[node name="TransientFloorSpawner19" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 7.5, 0, 15.5)
[node name="TransientFloorSpawner20" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 9, 0, 16.5)
[node name="TransientFloorSpawner21" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 9, 0, 14.5)
[node name="TransientFloorSpawner22" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 7.5, 0, 13.5)
[node name="TransientFloorSpawner23" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4, 0, 13.5)
[node name="TransientFloorSpawner24" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 12.5)
[node name="TransientFloorSpawner25" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.5, 0, 12)
[node name="TransientFloorSpawner26" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 0, 12)
[node name="TransientFloorSpawner27" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5, 0, 13.5)
[node name="TransientFloorSpawner28" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5, 0, 16)
[node name="TransientFloorSpawner29" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 11)
[node name="TransientFloorSpawner30" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.5, 0, 11.5)
[node name="TransientFloorSpawner31" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.5, 0, 12)
[node name="TransientFloorSpawner32" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 7, 0, 11.5)
[node name="TransientFloorSpawner33" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 8.5, 0, 10)
[node name="TransientFloorSpawner34" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 9, 0, 12)
[node name="TransientFloorSpawner35" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5, 0, 11.5)
[node name="TransientFloorSpawner36" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.5, 0, 11)
[node name="TransientFloorSpawner37" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1, 0, 10.5)
[node name="TransientFloorSpawner38" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.5, 0, 10)
[node name="TransientFloorSpawner39" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5, 0, 10)
[node name="TransientFloorSpawner40" parent="BeastPit/Structure/NavigationRegion3D/Spawners" instance=ExtResource("15_6frcc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 7, 0, 9.5)
[node name="Stairs2" type="Node3D" parent="BeastPit/Structure/NavigationRegion3D"]
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, -5.5, 0, -9.7)
[node name="Steps" type="CSGCombiner3D" parent="BeastPit/Structure/NavigationRegion3D/Stairs2"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -2.7)
use_collision = true
collision_layer = 68
collision_mask = 0
[node name="CSGBox3D" type="CSGBox3D" parent="BeastPit/Structure/NavigationRegion3D/Stairs2/Steps"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -1.8)
size = Vector3(3, 0.1, 0.4)
[node name="CSGBox3D2" type="CSGBox3D" parent="BeastPit/Structure/NavigationRegion3D/Stairs2/Steps"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.3, -1.5)
size = Vector3(3, 0.1, 0.4)
[node name="CSGBox3D3" type="CSGBox3D" parent="BeastPit/Structure/NavigationRegion3D/Stairs2/Steps"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.6, -1.2)
size = Vector3(3, 0.1, 0.4)
[node name="CSGBox3D4" type="CSGBox3D" parent="BeastPit/Structure/NavigationRegion3D/Stairs2/Steps"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.9, -0.899994)
size = Vector3(3, 0.1, 0.4)
[node name="CSGBox3D5" type="CSGBox3D" parent="BeastPit/Structure/NavigationRegion3D/Stairs2/Steps"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.2, -0.599991)
size = Vector3(3, 0.1, 0.4)
[node name="CSGBox3D6" type="CSGBox3D" parent="BeastPit/Structure/NavigationRegion3D/Stairs2/Steps"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, -0.299988)
size = Vector3(3, 0.1, 0.4)
[node name="CSGBox3D7" type="CSGBox3D" parent="BeastPit/Structure/NavigationRegion3D/Stairs2/Steps"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.8, 1.52588e-05)
size = Vector3(3, 0.1, 0.4)
[node name="CSGBox3D8" type="CSGBox3D" parent="BeastPit/Structure/NavigationRegion3D/Stairs2/Steps"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.1, 0.300018)
size = Vector3(3, 0.1, 0.4)
[node name="CSGBox3D9" type="CSGBox3D" parent="BeastPit/Structure/NavigationRegion3D/Stairs2/Steps"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.4, 0.600021)
size = Vector3(3, 0.1, 0.4)
[node name="CSGBox3D10" type="CSGBox3D" parent="BeastPit/Structure/NavigationRegion3D/Stairs2/Steps"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.7, 0.900024)
size = Vector3(3, 0.1, 0.4)
[node name="CSGBox3D11" type="CSGBox3D" parent="BeastPit/Structure/NavigationRegion3D/Stairs2/Steps"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.95, 1.25045)
size = Vector3(3, 0.1, 0.5)
[node name="StaticBody3D" type="StaticBody3D" parent="BeastPit/Structure/NavigationRegion3D/Stairs2/Steps"]
collision_mask = 0
[node name="CollisionShape3D" type="CollisionShape3D" parent="BeastPit/Structure/NavigationRegion3D/Stairs2/Steps/StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 0.707107, -0.707107, 0, 0.707107, 0.707107, 0, 1.4468, -0.353196)
shape = SubResource("BoxShape3D_qjnj2")
[node name="CollisionShape3D2" type="CollisionShape3D" parent="BeastPit/Structure/NavigationRegion3D/Stairs2/Steps/StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.95, 1.32415)
shape = SubResource("BoxShape3D_awnx0")
[node name="Bannister" type="CSGCombiner3D" parent="BeastPit/Structure/NavigationRegion3D/Stairs2"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -2.7)
use_collision = true
collision_layer = 5
collision_mask = 0
[node name="CSGBox3D12" type="CSGBox3D" parent="BeastPit/Structure/NavigationRegion3D/Stairs2/Bannister"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.5, 0.5, -1.8)
size = Vector3(0.1, 1, 0.2)
[node name="CSGBox3D13" type="CSGBox3D" parent="BeastPit/Structure/NavigationRegion3D/Stairs2/Bannister"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.5, 3.5, 1.2)
size = Vector3(0.1, 1, 0.2)
[node name="CSGBox3D14" type="CSGBox3D" parent="BeastPit/Structure/NavigationRegion3D/Stairs2/Bannister"]
transform = Transform3D(1, 0, 0, 0, 0.707107, -0.707107, 0, 0.707107, 0.707107, -1.5, 2.42865, -0.329697)
size = Vector3(0.1, 4.23, 0.2)
[node name="SpawnTrigger" type="StaticBody3D" parent="BeastPit"]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 2, 4, 0.75)
collision_layer = 5
[node name="MeshInstance3D" type="MeshInstance3D" parent="BeastPit/SpawnTrigger"]
mesh = SubResource("BoxMesh_goufh")
[node name="CollisionShape3D" type="CollisionShape3D" parent="BeastPit/SpawnTrigger"]
shape = SubResource("ConcavePolygonShape3D_bg05n")
[node name="Label3D" type="Label3D" parent="BeastPit/SpawnTrigger"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0.3)
text = "Spawn
Beast"
[node name="ButtonMesh" type="MeshInstance3D" parent="BeastPit/SpawnTrigger"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.4, 0.25)
mesh = SubResource("SphereMesh_awnx0")
skeleton = NodePath("")
[node name="InteractiveBody" type="StaticBody3D" parent="BeastPit/SpawnTrigger/ButtonMesh"]
collision_layer = 2
collision_mask = 0
[node name="CollisionShape3D" type="CollisionShape3D" parent="BeastPit/SpawnTrigger/ButtonMesh/InteractiveBody"]
shape = SubResource("SphereShape3D_cgmn0")
[node name="Interactive" type="Node" parent="BeastPit/SpawnTrigger/ButtonMesh/InteractiveBody"]
script = ExtResource("4_qjnj2")
enabled = true
label = "Level"
verb = "spawn beast"
metadata/_custom_type_script = "uid://deg5xd87cy8rg"
[node name="PhysCrateLong" parent="." instance=ExtResource("15_aix42")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.5, 0.5, 24)
[connection signal="activated" from="ResetPodium/ResetSwitch" to="." method="reset"] [connection signal="activated" from="ResetPodium/ResetSwitch" to="." method="reset"]
[connection signal="activated" from="NoduleSpawner/ButtonMesh/InteractiveBody/Interactive" to="." method="spawn_nodule"] [connection signal="activated" from="NoduleSpawner/ButtonMesh/InteractiveBody/Interactive" to="." method="spawn_nodule"]
[connection signal="activated" from="AlarmSpawner/ButtonMesh/InteractiveBody/Interactive" to="." method="spawn_alarm"] [connection signal="activated" from="AlarmSpawner/ButtonMesh/InteractiveBody/Interactive" to="." method="spawn_alarm"]
[connection signal="activated" from="AlarmTrigger/ButtonMesh/InteractiveBody/Interactive" to="." method="trigger_spawned_alarm"]
[connection signal="activated" from="Bulkhead/Podium/OpenSwitch" to="Bulkhead" method="open"] [connection signal="activated" from="Bulkhead/Podium/OpenSwitch" to="Bulkhead" method="open"]
[connection signal="activated" from="Bulkhead/Podium/OpenSwitch" to="Bulkhead/Podium/OpenSwitch" method="disable"] [connection signal="activated" from="Bulkhead/Podium/OpenSwitch" to="Bulkhead/Podium/OpenSwitch" method="disable"]
[connection signal="activated" from="Bulkhead/Podium/OpenSwitch" to="Bulkhead/Podium2/CloseSwitch" method="enable"] [connection signal="activated" from="Bulkhead/Podium/OpenSwitch" to="Bulkhead/Podium2/CloseSwitch" method="enable"]
[connection signal="activated" from="Bulkhead/Podium2/CloseSwitch" to="Bulkhead" method="close"] [connection signal="activated" from="Bulkhead/Podium2/CloseSwitch" to="Bulkhead" method="close"]
[connection signal="activated" from="Bulkhead/Podium2/CloseSwitch" to="Bulkhead/Podium/OpenSwitch" method="enable"] [connection signal="activated" from="Bulkhead/Podium2/CloseSwitch" to="Bulkhead/Podium/OpenSwitch" method="enable"]
[connection signal="activated" from="Bulkhead/Podium2/CloseSwitch" to="Bulkhead/Podium2/CloseSwitch" method="disable"] [connection signal="activated" from="Bulkhead/Podium2/CloseSwitch" to="Bulkhead/Podium2/CloseSwitch" method="disable"]
[connection signal="activated" from="BeastPit/SpawnTrigger/ButtonMesh/InteractiveBody/Interactive" to="." method="spawn_beast"]

View File

@ -339,6 +339,10 @@ environment = SubResource("Environment_pwykw")
[node name="GrunkBeast" parent="." instance=ExtResource("2_1lom2")] [node name="GrunkBeast" parent="." instance=ExtResource("2_1lom2")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -11.7, 1.5, -18.3) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -11.7, 1.5, -18.3)
spawn_on_load = null
anger_level = null
point_of_interest = null
debug_destroy = null
[node name="NavigationRegion3D" type="NavigationRegion3D" parent="."] [node name="NavigationRegion3D" type="NavigationRegion3D" parent="."]
navigation_mesh = SubResource("NavigationMesh_hv7qb") navigation_mesh = SubResource("NavigationMesh_hv7qb")

View File

@ -128,7 +128,6 @@ gameplay/beast/anger_threshold_pounce=140.0
MetalMaterial="This surface is made of metal." MetalMaterial="This surface is made of metal."
PlasticMaterial="This surface is made of plastic." PlasticMaterial="This surface is made of plastic."
MeetSpookSource="meet-spook event sources"
LurkPoint="Point which a lurking beast may wander to." LurkPoint="Point which a lurking beast may wander to."
BeastSpawnPoint="Spawn point for a grunkbeast" BeastSpawnPoint="Spawn point for a grunkbeast"
GrunkBeast="GrunkBeast instances." GrunkBeast="GrunkBeast instances."
@ -260,6 +259,7 @@ locale/translations=PackedStringArray("res://assets/text/text.en.translation")
3d_physics/layer_5="GameSounds" 3d_physics/layer_5="GameSounds"
3d_physics/layer_6="Player Physics" 3d_physics/layer_6="Player Physics"
3d_physics/layer_7="Prop Physics" 3d_physics/layer_7="Prop Physics"
3d_physics/layer_8="Beam Passthrough"
[physics] [physics]

View File

@ -1,7 +1,7 @@
[gd_scene load_steps=3 format=3 uid="uid://5y7gcq6igjpf"] [gd_scene load_steps=3 format=3 uid="uid://5y7gcq6igjpf"]
[ext_resource type="AudioStream" uid="uid://pltp1s1x8q6u" path="res://assets/sfx/tools/beam_loop.wav" id="1_hbyr8"] [ext_resource type="AudioStream" uid="uid://pltp1s1x8q6u" path="res://assets/sfx/tools/beam_loop.wav" id="1_hbyr8"]
[ext_resource type="Script" uid="uid://7mp6lj3f6srq" path="res://src/equipment/beam_sfx/beam_sfx.gd" id="2_qwosj"] [ext_resource type="Script" uid="uid://7mp6lj3f6srq" path="res://src/equipment/beam/beam_sfx/beam_sfx.gd" id="2_qwosj"]
[node name="BeamSFX" type="AudioStreamPlayer3D"] [node name="BeamSFX" type="AudioStreamPlayer3D"]
stream = ExtResource("1_hbyr8") stream = ExtResource("1_hbyr8")

View File

@ -1,7 +1,7 @@
[gd_scene load_steps=5 format=3 uid="uid://btq11kil0jcql"] [gd_scene load_steps=5 format=3 uid="uid://btq11kil0jcql"]
[ext_resource type="AudioStream" uid="uid://b5ik76jgl8mex" path="res://assets/sfx/tools/spray.wav" id="1_575yt"] [ext_resource type="AudioStream" uid="uid://b5ik76jgl8mex" path="res://assets/sfx/tools/spray.wav" id="1_575yt"]
[ext_resource type="Script" uid="uid://bhvkgqpm7sglw" path="res://src/equipment/beam_sfx/spray_sfx.gd" id="2_yajv7"] [ext_resource type="Script" uid="uid://bhvkgqpm7sglw" path="res://src/equipment/beam/beam_sfx/spray_sfx.gd" id="2_yajv7"]
[ext_resource type="Script" uid="uid://c5o1d2shq2qig" path="res://src/world/game_sound/game_sound_emitter.gd" id="3_rikqc"] [ext_resource type="Script" uid="uid://c5o1d2shq2qig" path="res://src/world/game_sound/game_sound_emitter.gd" id="3_rikqc"]
[sub_resource type="SphereShape3D" id="SphereShape3D_yaakk"] [sub_resource type="SphereShape3D" id="SphereShape3D_yaakk"]

View File

@ -23,6 +23,7 @@ func _process(_delta: float) -> void:
if is_colliding() and parent_tool.firing: if is_colliding() and parent_tool.firing:
var child_pos := get_collision_point() + get_collision_normal() * NORMAL_OFFSET var child_pos := get_collision_point() + get_collision_normal() * NORMAL_OFFSET
for c: Node in get_children(): for c: Node in get_children():
# Beam passthrough should not be repositioned
if c is Node3D: if c is Node3D:
(c as Node3D).global_position = child_pos (c as Node3D).global_position = child_pos

View File

@ -1,8 +1,8 @@
[gd_scene load_steps=6 format=3 uid="uid://b8vradbaw61ga"] [gd_scene load_steps=6 format=3 uid="uid://b8vradbaw61ga"]
[ext_resource type="Script" uid="uid://bqgi5p5nh6k1l" path="res://src/equipment/laser_cast/laser_cast.gd" id="1_xntcr"] [ext_resource type="Script" uid="uid://bqgi5p5nh6k1l" path="res://src/equipment/beam/laser_cast/laser_cast.gd" id="1_xntcr"]
[ext_resource type="PackedScene" uid="uid://oc6t5ubyybsa" path="res://src/effects/laser_dust.tscn" id="2_m5xmf"] [ext_resource type="PackedScene" uid="uid://oc6t5ubyybsa" path="res://src/effects/laser_dust.tscn" id="2_m5xmf"]
[ext_resource type="Script" uid="uid://br7war1wh7wfd" path="res://src/equipment/laser_cast/flicker_light.gd" id="3_bkg64"] [ext_resource type="Script" uid="uid://br7war1wh7wfd" path="res://src/equipment/beam/laser_cast/flicker_light.gd" id="3_bkg64"]
[ext_resource type="PackedScene" uid="uid://c3iv00vmdqxp0" path="res://src/effects/grunk_dust/grunk_dust.tscn" id="4_ekmqg"] [ext_resource type="PackedScene" uid="uid://c3iv00vmdqxp0" path="res://src/effects/grunk_dust/grunk_dust.tscn" id="4_ekmqg"]
[ext_resource type="Script" uid="uid://b88k7m1mwrd0v" path="res://src/effects/grunk_dust/grunk_dust.gd" id="5_r1geq"] [ext_resource type="Script" uid="uid://b88k7m1mwrd0v" path="res://src/effects/grunk_dust/grunk_dust.gd" id="5_r1geq"]

View File

@ -1,12 +1,12 @@
[gd_scene load_steps=17 format=3 uid="uid://cc102xko0u6yj"] [gd_scene load_steps=18 format=3 uid="uid://cc102xko0u6yj"]
[ext_resource type="Script" uid="uid://dngia2ldbccv7" path="res://src/equipment/point_spray/point_spray.gd" id="1_2yl2v"] [ext_resource type="Script" uid="uid://dngia2ldbccv7" path="res://src/equipment/beam/point_spray/point_spray.gd" id="1_2yl2v"]
[ext_resource type="Material" uid="uid://c00gndxoepuqh" path="res://assets/materials/laser_spray.tres" id="2_0pfy3"] [ext_resource type="Material" uid="uid://c00gndxoepuqh" path="res://assets/materials/laser_spray.tres" id="2_0pfy3"]
[ext_resource type="Texture2D" uid="uid://bn0gcsy37ahto" path="res://assets/ui/hud/reticle_large.png" id="2_qcl8j"] [ext_resource type="Texture2D" uid="uid://bn0gcsy37ahto" path="res://assets/ui/hud/reticle_large.png" id="2_qcl8j"]
[ext_resource type="PackedScene" uid="uid://btq11kil0jcql" path="res://src/equipment/beam_sfx/spray_sfx.tscn" id="3_5h54c"] [ext_resource type="PackedScene" uid="uid://btq11kil0jcql" path="res://src/equipment/beam/beam_sfx/spray_sfx.tscn" id="3_5h54c"]
[ext_resource type="PackedScene" uid="uid://b8vradbaw61ga" path="res://src/equipment/laser_cast/laser_cast.tscn" id="3_qmoff"] [ext_resource type="PackedScene" uid="uid://b8vradbaw61ga" path="res://src/equipment/beam/laser_cast/laser_cast.tscn" id="3_qmoff"]
[ext_resource type="Script" uid="uid://b274q7uvn0cvp" path="res://src/ui/rumbler_3d.gd" id="5_k4cg5"] [ext_resource type="Script" uid="uid://b274q7uvn0cvp" path="res://src/ui/rumbler_3d.gd" id="5_k4cg5"]
[ext_resource type="PackedScene" uid="uid://5y7gcq6igjpf" path="res://src/equipment/beam_sfx/beam_sfx.tscn" id="5_tpavj"] [ext_resource type="PackedScene" uid="uid://5y7gcq6igjpf" path="res://src/equipment/beam/beam_sfx/beam_sfx.tscn" id="5_tpavj"]
[ext_resource type="Script" uid="uid://dj2x7x5qkbym1" path="res://src/ui/canvas_projector.gd" id="6_h2fjt"] [ext_resource type="Script" uid="uid://dj2x7x5qkbym1" path="res://src/ui/canvas_projector.gd" id="6_h2fjt"]
[ext_resource type="Texture2D" uid="uid://brcxorcpe2g56" path="res://assets/ui/hud/tools/point_sprayer.png" id="6_otnek"] [ext_resource type="Texture2D" uid="uid://brcxorcpe2g56" path="res://assets/ui/hud/tools/point_sprayer.png" id="6_otnek"]
[ext_resource type="PackedScene" uid="uid://bnp6vqiixminx" path="res://src/ui/hud/grunk_gauge/grunk_gauge.tscn" id="10_dlin7"] [ext_resource type="PackedScene" uid="uid://bnp6vqiixminx" path="res://src/ui/hud/grunk_gauge/grunk_gauge.tscn" id="10_dlin7"]
@ -52,6 +52,9 @@ initial_velocity_max = 8.0
gravity = Vector3(0, 0, 0) gravity = Vector3(0, 0, 0)
attractor_interaction_enabled = false attractor_interaction_enabled = false
[sub_resource type="SeparationRayShape3D" id="SeparationRayShape3D_fm14y"]
length = 3.0
[sub_resource type="CapsuleMesh" id="CapsuleMesh_k4cg5"] [sub_resource type="CapsuleMesh" id="CapsuleMesh_k4cg5"]
radius = 0.025 radius = 0.025
height = 0.3 height = 0.3
@ -109,6 +112,16 @@ cull_mask = 1048573
[node name="BeamSFX" parent="Muzzle" instance=ExtResource("5_tpavj")] [node name="BeamSFX" parent="Muzzle" instance=ExtResource("5_tpavj")]
unique_name_in_owner = true unique_name_in_owner = true
[node name="BeamPassthroughArea" type="Area3D" parent="Muzzle"]
collision_layer = 128
collision_mask = 0
[node name="PassthroughCollision" type="CollisionShape3D" parent="Muzzle/BeamPassthroughArea"]
transform = Transform3D(1, 0, 0, 0, -1, 8.74228e-08, 0, -8.74228e-08, -1, 0, 0, 0)
shape = SubResource("SeparationRayShape3D_fm14y")
disabled = true
debug_color = Color(0.84881, 0.374465, 0, 0.42)
[node name="HUDTool" type="Node3D" parent="."] [node name="HUDTool" type="Node3D" parent="."]
unique_name_in_owner = true unique_name_in_owner = true
top_level = true top_level = true
@ -153,3 +166,6 @@ offset_left = 344.0
offset_top = 211.0 offset_top = 211.0
offset_right = 344.0 offset_right = 344.0
offset_bottom = 211.0 offset_bottom = 211.0
[connection signal="firing_start" from="." to="Muzzle/BeamPassthroughArea/PassthroughCollision" method="set_disabled" binds= [false]]
[connection signal="firing_stop" from="." to="Muzzle/BeamPassthroughArea/PassthroughCollision" method="set_disabled" binds= [true]]

View File

@ -1,10 +1,12 @@
[gd_scene load_steps=8 format=3 uid="uid://qknkdy6aics1"] [gd_scene load_steps=9 format=3 uid="uid://qknkdy6aics1"]
[ext_resource type="Script" uid="uid://d1e003a8jg3gm" path="res://src/equipment/toothbrush/toothbrush.gd" id="1_ivelq"] [ext_resource type="Script" uid="uid://d1e003a8jg3gm" path="res://src/equipment/beam/toothbrush/toothbrush.gd" id="1_ivelq"]
[ext_resource type="Script" uid="uid://dj2x7x5qkbym1" path="res://src/ui/canvas_projector.gd" id="2_awr0g"] [ext_resource type="Script" uid="uid://dj2x7x5qkbym1" path="res://src/ui/canvas_projector.gd" id="2_awr0g"]
[ext_resource type="Texture2D" uid="uid://6vc3ye0jnqy4" path="res://assets/ui/hud/tools/toothbrush_idle.png" id="3_sxute"] [ext_resource type="Texture2D" uid="uid://6vc3ye0jnqy4" path="res://assets/ui/hud/tools/toothbrush_idle.png" id="3_sxute"]
[ext_resource type="Texture2D" uid="uid://djisqgfxhsrs2" path="res://assets/ui/hud/tools/toothbrush_used.png" id="4_atd0h"] [ext_resource type="Texture2D" uid="uid://djisqgfxhsrs2" path="res://assets/ui/hud/tools/toothbrush_used.png" id="4_atd0h"]
[sub_resource type="SeparationRayShape3D" id="SeparationRayShape3D_pv4ns"]
[sub_resource type="Animation" id="Animation_8x7qe"] [sub_resource type="Animation" id="Animation_8x7qe"]
length = 0.001 length = 0.001
tracks/0/type = "bezier" tracks/0/type = "bezier"
@ -74,6 +76,17 @@ target_position = Vector3(0, 0, -1)
collision_mask = 4 collision_mask = 4
hit_from_inside = true hit_from_inside = true
[node name="BeamPassthroughArea" type="Area3D" parent="Raycast"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
collision_layer = 128
collision_mask = 0
[node name="PassthroughCollision" type="CollisionShape3D" parent="Raycast/BeamPassthroughArea"]
transform = Transform3D(1, 0, 0, 0, -1, -8.74228e-08, 0, 8.74228e-08, -1, 0, 0, 0)
shape = SubResource("SeparationRayShape3D_pv4ns")
disabled = true
debug_color = Color(0.84881, 0.374465, 0, 0.42)
[node name="RestingPosition" type="Marker3D" parent="."] [node name="RestingPosition" type="Marker3D" parent="."]
unique_name_in_owner = true unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.2) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.2)

View File

@ -1,13 +1,13 @@
[gd_scene load_steps=23 format=3 uid="uid://d2hnxr5l6w2x4"] [gd_scene load_steps=24 format=3 uid="uid://d2hnxr5l6w2x4"]
[ext_resource type="Script" uid="uid://dv40fyim2g2fa" path="res://src/equipment/wide_spray/wide_spray.gd" id="1_ggkto"] [ext_resource type="Script" uid="uid://dv40fyim2g2fa" path="res://src/equipment/beam/wide_spray/wide_spray.gd" id="1_ggkto"]
[ext_resource type="Material" uid="uid://c00gndxoepuqh" path="res://assets/materials/laser_spray.tres" id="2_26efp"] [ext_resource type="Material" uid="uid://c00gndxoepuqh" path="res://assets/materials/laser_spray.tres" id="2_26efp"]
[ext_resource type="Texture2D" uid="uid://cx28sj02y31kj" path="res://assets/ui/hud/reticle_crosshair.png" id="3_78jy6"] [ext_resource type="Texture2D" uid="uid://cx28sj02y31kj" path="res://assets/ui/hud/reticle_crosshair.png" id="3_78jy6"]
[ext_resource type="PackedScene" uid="uid://btq11kil0jcql" path="res://src/equipment/beam_sfx/spray_sfx.tscn" id="3_v0jnx"] [ext_resource type="PackedScene" uid="uid://btq11kil0jcql" path="res://src/equipment/beam/beam_sfx/spray_sfx.tscn" id="3_v0jnx"]
[ext_resource type="PackedScene" uid="uid://b8vradbaw61ga" path="res://src/equipment/laser_cast/laser_cast.tscn" id="3_xahet"] [ext_resource type="PackedScene" uid="uid://b8vradbaw61ga" path="res://src/equipment/beam/laser_cast/laser_cast.tscn" id="3_xahet"]
[ext_resource type="Texture2D" uid="uid://carrggw6kp14w" path="res://assets/ui/hud/reticle_left.png" id="4_rotxf"] [ext_resource type="Texture2D" uid="uid://carrggw6kp14w" path="res://assets/ui/hud/reticle_left.png" id="4_rotxf"]
[ext_resource type="Texture2D" uid="uid://wp03nuwt8hp5" path="res://assets/ui/hud/reticle_right.png" id="5_xo3vu"] [ext_resource type="Texture2D" uid="uid://wp03nuwt8hp5" path="res://assets/ui/hud/reticle_right.png" id="5_xo3vu"]
[ext_resource type="PackedScene" uid="uid://5y7gcq6igjpf" path="res://src/equipment/beam_sfx/beam_sfx.tscn" id="7_hv82w"] [ext_resource type="PackedScene" uid="uid://5y7gcq6igjpf" path="res://src/equipment/beam/beam_sfx/beam_sfx.tscn" id="7_hv82w"]
[ext_resource type="Script" uid="uid://b274q7uvn0cvp" path="res://src/ui/rumbler_3d.gd" id="7_ku0nd"] [ext_resource type="Script" uid="uid://b274q7uvn0cvp" path="res://src/ui/rumbler_3d.gd" id="7_ku0nd"]
[ext_resource type="Script" uid="uid://dj2x7x5qkbym1" path="res://src/ui/canvas_projector.gd" id="8_j7ker"] [ext_resource type="Script" uid="uid://dj2x7x5qkbym1" path="res://src/ui/canvas_projector.gd" id="8_j7ker"]
[ext_resource type="Texture2D" uid="uid://dxjwpai3or1hw" path="res://assets/ui/hud/tools/wide_sprayer.png" id="9_8vo2h"] [ext_resource type="Texture2D" uid="uid://dxjwpai3or1hw" path="res://assets/ui/hud/tools/wide_sprayer.png" id="9_8vo2h"]
@ -55,6 +55,9 @@ initial_velocity_max = 8.0
gravity = Vector3(0, 0, 0) gravity = Vector3(0, 0, 0)
attractor_interaction_enabled = false attractor_interaction_enabled = false
[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_2oyow"]
points = PackedVector3Array(-0.5, -1, -0.05, -0.5, -1, 0.05, 0, 1, -0.05, 0.5, -1, -0.05, 0.5, -1, 0.05, 0, 1, 0.05)
[sub_resource type="BoxMesh" id="BoxMesh_fmqw2"] [sub_resource type="BoxMesh" id="BoxMesh_fmqw2"]
size = Vector3(0.05, 0.05, 0.3) size = Vector3(0.05, 0.05, 0.3)
@ -273,6 +276,16 @@ local_coords = true
process_material = SubResource("ParticleProcessMaterial_lyk2j") process_material = SubResource("ParticleProcessMaterial_lyk2j")
draw_pass_1 = SubResource("QuadMesh_trcry") draw_pass_1 = SubResource("QuadMesh_trcry")
[node name="BeamPassthroughArea" type="Area3D" parent="Muzzle/Pivot"]
collision_layer = 128
collision_mask = 0
[node name="PassthroughCollision" type="CollisionShape3D" parent="Muzzle/Pivot/BeamPassthroughArea"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, -1)
shape = SubResource("ConvexPolygonShape3D_2oyow")
disabled = true
debug_color = Color(0.84881, 0.374465, 0, 0.42)
[node name="BeamSFX" parent="Muzzle" instance=ExtResource("7_hv82w")] [node name="BeamSFX" parent="Muzzle" instance=ExtResource("7_hv82w")]
unique_name_in_owner = true unique_name_in_owner = true
@ -337,4 +350,6 @@ libraries = {
&"": SubResource("AnimationLibrary_fmqw2") &"": SubResource("AnimationLibrary_fmqw2")
} }
[connection signal="firing_start" from="." to="Muzzle/Pivot/BeamPassthroughArea/PassthroughCollision" method="set_disabled" binds= [false]]
[connection signal="firing_stop" from="." to="Muzzle/Pivot/BeamPassthroughArea/PassthroughCollision" method="set_disabled" binds= [true]]
[connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_animation_finished"] [connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_animation_finished"]

View File

@ -1,6 +1,9 @@
class_name Tool extends Node3D class_name Tool extends Node3D
## Abstract base class for spraygun types ## Abstract base class for spraygun types
signal firing_start
signal firing_stop
@export var hud_accel := 50.0 @export var hud_accel := 50.0
var firing := false var firing := false
@ -24,12 +27,16 @@ func switch_mode() -> void:
## Called each frame that this tool is being fired. ## Called each frame that this tool is being fired.
func fire() -> void: func fire() -> void:
if not firing:
firing_start.emit()
firing = true firing = true
_fire() _fire()
## Called each frame that this tool is not being fired. ## Called each frame that this tool is not being fired.
func idle() -> void: func idle() -> void:
if firing:
firing_stop.emit()
firing = false firing = false
_idle() _idle()

View File

@ -2,11 +2,11 @@
[ext_resource type="Script" uid="uid://buwh0g1ga2aka" path="res://src/player/player.gd" id="1_npueo"] [ext_resource type="Script" uid="uid://buwh0g1ga2aka" path="res://src/player/player.gd" id="1_npueo"]
[ext_resource type="Script" uid="uid://cx1yt0drthpw3" path="res://src/player/camera_controller.gd" id="2_veeqv"] [ext_resource type="Script" uid="uid://cx1yt0drthpw3" path="res://src/player/camera_controller.gd" id="2_veeqv"]
[ext_resource type="PackedScene" uid="uid://cc102xko0u6yj" path="res://src/equipment/point_spray/point_spray.tscn" id="3_6wgkm"] [ext_resource type="PackedScene" uid="uid://cc102xko0u6yj" path="res://src/equipment/beam/point_spray/point_spray.tscn" id="3_6wgkm"]
[ext_resource type="PackedScene" uid="uid://d2hnxr5l6w2x4" path="res://src/equipment/wide_spray/wide_spray.tscn" id="3_ibq07"] [ext_resource type="PackedScene" uid="uid://d2hnxr5l6w2x4" path="res://src/equipment/beam/wide_spray/wide_spray.tscn" id="3_ibq07"]
[ext_resource type="Script" uid="uid://cwy3akimaeib" path="res://src/player/tool_mount.gd" id="3_jiejy"] [ext_resource type="Script" uid="uid://cwy3akimaeib" path="res://src/player/tool_mount.gd" id="3_jiejy"]
[ext_resource type="PackedScene" uid="uid://dq1x21tq06dud" path="res://src/ui/hud/player_hud.tscn" id="5_jvafu"] [ext_resource type="PackedScene" uid="uid://dq1x21tq06dud" path="res://src/ui/hud/player_hud.tscn" id="5_jvafu"]
[ext_resource type="PackedScene" uid="uid://qknkdy6aics1" path="res://src/equipment/toothbrush/toothbrush.tscn" id="6_o822w"] [ext_resource type="PackedScene" uid="uid://qknkdy6aics1" path="res://src/equipment/beam/toothbrush/toothbrush.tscn" id="6_o822w"]
[ext_resource type="PackedScene" uid="uid://c21ksxjyixqe1" path="res://src/equipment/mp3_player/mp3_player.tscn" id="7_e7e1q"] [ext_resource type="PackedScene" uid="uid://c21ksxjyixqe1" path="res://src/equipment/mp3_player/mp3_player.tscn" id="7_e7e1q"]
[ext_resource type="Script" uid="uid://b274q7uvn0cvp" path="res://src/ui/rumbler_3d.gd" id="7_p6grl"] [ext_resource type="Script" uid="uid://b274q7uvn0cvp" path="res://src/ui/rumbler_3d.gd" id="7_p6grl"]
[ext_resource type="Script" uid="uid://b1vyq7e81nyt0" path="res://src/player/headbob_controller.gd" id="7_x42xx"] [ext_resource type="Script" uid="uid://b1vyq7e81nyt0" path="res://src/player/headbob_controller.gd" id="7_x42xx"]

View File

@ -0,0 +1,14 @@
class_name BeastSpawner extends Node3D
## A potential spawn point for a beast in the map.
const GROUP = "BeastSpawnPoint"
@export var beast_scene: PackedScene
func instantiate() -> GrunkBeast:
return beast_scene.instantiate()
func do_spawn() -> void:
pass # Implemented in derived type

View File

@ -0,0 +1 @@
uid://bc6w4fcthemjx

View File

@ -0,0 +1,10 @@
class_name FloorSpawner extends BeastSpawner
## Beast spawner on the floor
func do_spawn() -> void:
var instance: GrunkBeast = instantiate()
add_sibling(instance)
instance.global_transform = global_transform
instance.start_spawn()

View File

@ -0,0 +1 @@
uid://cqildi0gndwp2

View File

@ -0,0 +1,10 @@
[gd_scene load_steps=3 format=3 uid="uid://c8vbjgol5nenc"]
[ext_resource type="Script" uid="uid://cqildi0gndwp2" path="res://src/world/grunk_beast/beast_spawner/floor_spawner.gd" id="1_hrlgt"]
[ext_resource type="PackedScene" uid="uid://ehf5sg3ahvbf" path="res://src/world/grunk_beast/grunk_beast.tscn" id="2_dgp11"]
[node name="FloorSpawner" type="Node3D" groups=["BeastSpawnPoint"]]
script = ExtResource("1_hrlgt")
beast_scene = ExtResource("2_dgp11")
[node name="Marker3D" type="Marker3D" parent="."]

View File

@ -0,0 +1,23 @@
[gd_scene load_steps=4 format=3 uid="uid://5vh7mnjavlle"]
[ext_resource type="Script" uid="uid://cqildi0gndwp2" path="res://src/world/grunk_beast/beast_spawner/floor_spawner.gd" id="1_42oks"]
[ext_resource type="PackedScene" uid="uid://ehf5sg3ahvbf" path="res://src/world/grunk_beast/grunk_beast.tscn" id="2_e5rh0"]
[sub_resource type="CylinderShape3D" id="CylinderShape3D_42oks"]
height = 0.02
radius = 1.2
[node name="TransientFloorSpawner" type="Node3D" groups=["BeastSpawnPoint"]]
script = ExtResource("1_42oks")
beast_scene = ExtResource("2_e5rh0")
metadata/_custom_type_script = "uid://cqildi0gndwp2"
[node name="Area3D" type="Area3D" parent="."]
collision_layer = 0
collision_mask = 128
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D"]
shape = SubResource("CylinderShape3D_42oks")
debug_color = Color(0.980392, 0.854902, 0, 1)
[connection signal="area_entered" from="Area3D" to="." method="queue_free" unbinds=1]

View File

@ -5,8 +5,12 @@ class_name AwaitSignal extends ActionLeaf
var _blocks: Dictionary[Signal, bool] = {} var _blocks: Dictionary[Signal, bool] = {}
func is_blocked() -> bool:
return !!_blocks
func tick(_actor: Node, _blackboard: Blackboard) -> int: func tick(_actor: Node, _blackboard: Blackboard) -> int:
if _blocks: if is_blocked():
return RUNNING return RUNNING
return SUCCESS return SUCCESS

View File

@ -10,6 +10,6 @@ class_name CompareSetting extends ConditionLeaf
func tick(_actor: Node, blackboard: Blackboard) -> int: func tick(_actor: Node, blackboard: Blackboard) -> int:
var blackboard_value: float = blackboard.get_value(blackboard_key) var blackboard_value: float = blackboard.get_value(blackboard_key, -INF)
var settings_value: float = ProjectSettings.get_setting(settings_key) var settings_value: float = ProjectSettings.get_setting(settings_key, INF)
return SUCCESS if blackboard_value >= settings_value else FAILURE return SUCCESS if blackboard_value >= settings_value else FAILURE

View File

@ -7,7 +7,7 @@ const POI_KEY := "point_of_interest"
#endregion #endregion
#region Exported Properties #region Exported Properties
@export var play_spawn_animation := true @export var spawn_on_load := false
@export var speed_curve: Curve @export var speed_curve: Curve
@export var anger_level: float: @export var anger_level: float:
set = _set_anger_level, set = _set_anger_level,
@ -101,7 +101,7 @@ func _ready() -> void:
nav_agent.velocity_computed.connect(_on_velocity_computed) nav_agent.velocity_computed.connect(_on_velocity_computed)
if World.instance and World.instance.manager: if World.instance and World.instance.manager:
World.instance.manager.alarm_triggered.connect(_on_alarm_triggered) World.instance.manager.alarm_triggered.connect(_on_alarm_triggered)
if play_spawn_animation: if spawn_on_load:
start_spawn() start_spawn()
@ -165,7 +165,7 @@ func _physics_process(_delta: float) -> void:
if not is_on_floor(): if not is_on_floor():
motion += gravity motion += gravity
if motion: if motion.x or motion.z:
model.set_target_rotation(atan2(motion.x, motion.z)) model.set_target_rotation(atan2(motion.x, motion.z))
if nav_agent.avoidance_enabled: if nav_agent.avoidance_enabled:
@ -181,6 +181,9 @@ func _on_velocity_computed(safe_velocity: Vector3) -> void:
func on_sound_detected(source: Vector3) -> void: func on_sound_detected(source: Vector3) -> void:
if root_block.is_blocked():
return
point_of_interest = source point_of_interest = source
if sound_detection_cooldown.is_stopped(): if sound_detection_cooldown.is_stopped():
print_debug("Beast heard something from ", source) print_debug("Beast heard something from ", source)
@ -204,10 +207,14 @@ func _on_waypoint_reached(_details: Dictionary) -> void:
func _anger_decay() -> void: func _anger_decay() -> void:
if not root_block.is_blocked():
anger_level -= GrunkBeast.anger_decay_rate anger_level -= GrunkBeast.anger_decay_rate
func _on_alarm_triggered(source: GunkAlarm) -> void: func _on_alarm_triggered(source: GunkAlarm) -> void:
if root_block.is_blocked():
return
print_debug("The beast was angered by the alarm!") print_debug("The beast was angered by the alarm!")
point_of_interest = source.global_position point_of_interest = source.global_position
anger_level += GrunkBeast.anger_alarm anger_level += GrunkBeast.anger_alarm
@ -217,6 +224,9 @@ func _on_alarm_triggered(source: GunkAlarm) -> void:
func _on_touch(_body: Node3D) -> void: func _on_touch(_body: Node3D) -> void:
if root_block.is_blocked():
return
if touch_cooldown.is_stopped(): if touch_cooldown.is_stopped():
print_debug("Touched the beast!") print_debug("Touched the beast!")
anger_level += GrunkBeast.anger_touch anger_level += GrunkBeast.anger_touch

View File

@ -64,7 +64,11 @@ collision_layer = 36
wall_min_slide_angle = 0.174533 wall_min_slide_angle = 0.174533
floor_max_angle = 1.0472 floor_max_angle = 1.0472
script = ExtResource("2_qqnhb") script = ExtResource("2_qqnhb")
spawn_on_load = null
speed_curve = SubResource("Curve_sm756") speed_curve = SubResource("Curve_sm756")
anger_level = null
point_of_interest = null
debug_destroy = null
[node name="FrameSkipper" type="Node3D" parent="."] [node name="FrameSkipper" type="Node3D" parent="."]
script = ExtResource("2_lak6w") script = ExtResource("2_lak6w")
@ -73,6 +77,7 @@ frame_skip = 2
[node name="Shambler" parent="FrameSkipper" instance=ExtResource("2_csisu")] [node name="Shambler" parent="FrameSkipper" instance=ExtResource("2_csisu")]
unique_name_in_owner = true unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0)
visible = false
time_scale_factor = 2.0 time_scale_factor = 2.0
[node name="CollisionShape3D" type="CollisionShape3D" parent="."] [node name="CollisionShape3D" type="CollisionShape3D" parent="."]
@ -367,7 +372,7 @@ metadata/_custom_type_script = "uid://cg016dbe7gs1x"
script = ExtResource("11_mbqcc") script = ExtResource("11_mbqcc")
mean_time = 4.0 mean_time = 4.0
st_dev_time = 0.6 st_dev_time = 0.6
wait_time = 4.77435 wait_time = 4.07526
metadata/_custom_type_script = "uid://beyk2xtbjrsg4" metadata/_custom_type_script = "uid://beyk2xtbjrsg4"
[node name="PickRandomInvestigationTarget" type="Node" parent="GrunkBeastBehavior/StateSelector/TrackingMode/ActionSelector/InvestigateAction/AlwaysSucceedDecorator/InvestigateSequence/RandomDelay"] [node name="PickRandomInvestigationTarget" type="Node" parent="GrunkBeastBehavior/StateSelector/TrackingMode/ActionSelector/InvestigateAction/AlwaysSucceedDecorator/InvestigateSequence/RandomDelay"]
@ -461,7 +466,7 @@ metadata/_custom_type_script = "uid://bogt3htgqe12s"
script = ExtResource("11_mbqcc") script = ExtResource("11_mbqcc")
mean_time = 9.0 mean_time = 9.0
st_dev_time = 1.0 st_dev_time = 1.0
wait_time = 8.60673 wait_time = 8.31225
metadata/_custom_type_script = "uid://beyk2xtbjrsg4" metadata/_custom_type_script = "uid://beyk2xtbjrsg4"
[node name="PickRandomLurkTarget" type="Node" parent="GrunkBeastBehavior/StateSelector/LurkingMode/RandomDelay"] [node name="PickRandomLurkTarget" type="Node" parent="GrunkBeastBehavior/StateSelector/LurkingMode/RandomDelay"]

View File

@ -28,6 +28,7 @@ var blend_input := 0.0
func _ready() -> void: func _ready() -> void:
animation_player.speed_scale = time_scale_factor animation_player.speed_scale = time_scale_factor
_sync_pivot_to_root()
_update_transform() _update_transform()
@ -43,7 +44,20 @@ func _end_player_rumble() -> void:
create_tween().tween_property(Player.instance, "camera_rumble", 0.0, 0.4) create_tween().tween_property(Player.instance, "camera_rumble", 0.0, 0.4)
func _sync_pivot_to_root() -> void:
look_target_pivot.global_rotation.y = global_rotation.y
target_theta = global_rotation.y
func play_spawn_animation() -> void: func play_spawn_animation() -> void:
# Snap to face player if possible
if is_instance_valid(Player.instance):
look_at(Player.instance.global_position, Vector3.UP, true)
rotation.x = 0
rotation.z = 0
_sync_pivot_to_root()
_update_transform()
animation_tree["parameters/emerge_floor_trigger/request"] = ( animation_tree["parameters/emerge_floor_trigger/request"] = (
AnimationNodeOneShot.ONE_SHOT_REQUEST_FIRE AnimationNodeOneShot.ONE_SHOT_REQUEST_FIRE
) )

View File

@ -56,7 +56,6 @@ animation = &"walk_front"
animation = &"walk_rear" animation = &"walk_rear"
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_nayyt"] [sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_nayyt"]
graph_offset = Vector2(-1196.38, 101.408)
nodes/anim_scale/node = SubResource("AnimationNodeTimeScale_s7rwx") nodes/anim_scale/node = SubResource("AnimationNodeTimeScale_s7rwx")
nodes/anim_scale/position = Vector2(280, 140) nodes/anim_scale/position = Vector2(280, 140)
nodes/emerge_floor/node = SubResource("AnimationNodeAnimation_vmxrd") nodes/emerge_floor/node = SubResource("AnimationNodeAnimation_vmxrd")
@ -221,7 +220,6 @@ parameters/rear_scale/scale = 1.0
[node name="DefaultLookTargetPivot" type="Node3D" parent="." index="3"] [node name="DefaultLookTargetPivot" type="Node3D" parent="." index="3"]
unique_name_in_owner = true unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
top_level = true top_level = true
[node name="DefaultLookPosition" type="Marker3D" parent="DefaultLookTargetPivot" index="0"] [node name="DefaultLookPosition" type="Marker3D" parent="DefaultLookTargetPivot" index="0"]

View File

@ -4,7 +4,7 @@
[ext_resource type="Resource" uid="uid://tgac5tnfx56r" path="res://src/world/world_manager.tres" id="2_5kmgb"] [ext_resource type="Resource" uid="uid://tgac5tnfx56r" path="res://src/world/world_manager.tres" id="2_5kmgb"]
[ext_resource type="PackedScene" uid="uid://byvjsvavbg5xe" path="res://src/ui/menus/pause_menu/pause_menu.tscn" id="2_6fy3g"] [ext_resource type="PackedScene" uid="uid://byvjsvavbg5xe" path="res://src/ui/menus/pause_menu/pause_menu.tscn" id="2_6fy3g"]
[ext_resource type="Resource" uid="uid://0i72bf8ip1lx" path="res://src/world/spook_manager.tres" id="3_l0av5"] [ext_resource type="Resource" uid="uid://0i72bf8ip1lx" path="res://src/world/spook_manager.tres" id="3_l0av5"]
[ext_resource type="PackedScene" uid="uid://700gr7k3gqlf" path="res://levels/grunkbeast_test/visual_test/visual_test.tscn" id="4_5kmgb"] [ext_resource type="PackedScene" uid="uid://b8rv6dg4tgaeb" path="res://levels/mechanic_test/mechanic_test.tscn" id="4_5kmgb"]
[ext_resource type="PackedScene" uid="uid://c0uitm5cg88h1" path="res://src/ui/menus/kill_screen/kill_screen.tscn" id="6_l0av5"] [ext_resource type="PackedScene" uid="uid://c0uitm5cg88h1" path="res://src/ui/menus/kill_screen/kill_screen.tscn" id="6_l0av5"]
[ext_resource type="PackedScene" uid="uid://brknr57xc2cp0" path="res://src/ui/elements/save_icon/save_icon.tscn" id="7_5kmgb"] [ext_resource type="PackedScene" uid="uid://brknr57xc2cp0" path="res://src/ui/elements/save_icon/save_icon.tscn" id="7_5kmgb"]

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=8 format=3 uid="uid://db8w8eljku535"] [gd_scene load_steps=10 format=3 uid="uid://db8w8eljku535"]
[ext_resource type="Script" uid="uid://duegbpkukv4e" path="res://utilities/sandbox/sandbox.gd" id="1_mxso2"] [ext_resource type="Script" uid="uid://duegbpkukv4e" path="res://utilities/sandbox/sandbox.gd" id="1_mxso2"]
[ext_resource type="Script" uid="uid://bb0t2ovl7wifo" path="res://addons/beehave/nodes/beehave_tree.gd" id="2_fjanr"] [ext_resource type="Script" uid="uid://bb0t2ovl7wifo" path="res://addons/beehave/nodes/beehave_tree.gd" id="2_fjanr"]
@ -7,6 +7,10 @@
[ext_resource type="Script" uid="uid://cg016dbe7gs1x" path="res://addons/beehave/nodes/composites/sequence.gd" id="5_ua2rg"] [ext_resource type="Script" uid="uid://cg016dbe7gs1x" path="res://addons/beehave/nodes/composites/sequence.gd" id="5_ua2rg"]
[ext_resource type="Script" uid="uid://dorri1tul8gfx" path="res://addons/beehave/nodes/decorators/delayer.gd" id="6_buuky"] [ext_resource type="Script" uid="uid://dorri1tul8gfx" path="res://addons/beehave/nodes/decorators/delayer.gd" id="6_buuky"]
[ext_resource type="Script" uid="uid://c84st521ytmk3" path="res://addons/beehave/nodes/decorators/until_fail.gd" id="6_f6f0v"] [ext_resource type="Script" uid="uid://c84st521ytmk3" path="res://addons/beehave/nodes/decorators/until_fail.gd" id="6_f6f0v"]
[ext_resource type="Script" uid="uid://br8rtikypenjg" path="res://utilities/sandbox/track_target.gd" id="8_f6f0v"]
[sub_resource type="CylinderMesh" id="CylinderMesh_buuky"]
top_radius = 0.0
[node name="Sandbox" type="Node"] [node name="Sandbox" type="Node"]
script = ExtResource("1_mxso2") script = ExtResource("1_mxso2")
@ -14,7 +18,7 @@ script = ExtResource("1_mxso2")
[node name="BeehaveTree" type="Node" parent="." node_paths=PackedStringArray("blackboard", "actor")] [node name="BeehaveTree" type="Node" parent="." node_paths=PackedStringArray("blackboard", "actor")]
script = ExtResource("2_fjanr") script = ExtResource("2_fjanr")
tick_rate = 5 tick_rate = 5
blackboard = NodePath("@Node@22149") blackboard = NodePath("@Node@86400")
actor = NodePath("..") actor = NodePath("..")
metadata/_custom_type_script = "uid://bb0t2ovl7wifo" metadata/_custom_type_script = "uid://bb0t2ovl7wifo"
@ -54,3 +58,16 @@ metadata/_custom_type_script = "uid://dorri1tul8gfx"
[node name="OnceInAWhile" type="Node" parent="BeehaveTree/SequenceReactiveComposite/SequenceComposite/UntilFailDecorator/SequenceReactiveComposite/DelayDecorator"] [node name="OnceInAWhile" type="Node" parent="BeehaveTree/SequenceReactiveComposite/SequenceComposite/UntilFailDecorator/SequenceReactiveComposite/DelayDecorator"]
script = ExtResource("4_1rbkg") script = ExtResource("4_1rbkg")
metadata/_custom_type_script = "uid://yar3g43pb3fm" metadata/_custom_type_script = "uid://yar3g43pb3fm"
[node name="Arrow" type="Node3D" parent="." node_paths=PackedStringArray("target")]
transform = Transform3D(-0.555686, 0, 0.831392, 0, 1, 0, -0.831392, 0, -0.555686, 0, 0, 0)
script = ExtResource("8_f6f0v")
target = NodePath("../ArrowTarget")
[node name="MeshInstance3D" type="MeshInstance3D" parent="Arrow"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, -1)
mesh = SubResource("CylinderMesh_buuky")
skeleton = NodePath("../..")
[node name="ArrowTarget" type="Marker3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.06604, 1.18177, -2.04929)

View File

@ -0,0 +1,10 @@
@tool
extends Node3D
@export var target: Node3D
func _process(_delta: float) -> void:
if target:
look_at(target.global_position, Vector3.UP, true)
rotation.x = 0

View File

@ -0,0 +1 @@
uid://br8rtikypenjg