Elevators

This commit is contained in:
Marco 2025-06-12 16:26:11 +02:00
commit 4fc136e5d7
39 changed files with 4471 additions and 264 deletions

0
3D/MapModels/.gdignore Normal file
View file

Binary file not shown.

File diff suppressed because one or more lines are too long

1123
3D/Maps/autosave/test.5.map Normal file

File diff suppressed because it is too large Load diff

1172
3D/Maps/autosave/test.6.map Normal file

File diff suppressed because it is too large Load diff

1182
3D/Maps/autosave/test.7.map Normal file

File diff suppressed because it is too large Load diff

View file

@ -1112,3 +1112,76 @@
"classname" "light_spot"
"origin" "136 408 40"
}
// entity 10
{
"classname" "trigger_area"
// brush 0
{
( 336 384 16 ) ( 336 385 16 ) ( 336 384 17 ) __TB_empty 0 0 0 1 1
( 336 384 16 ) ( 336 384 17 ) ( 337 384 16 ) __TB_empty 16 0 0 1 1
( 336 384 16 ) ( 337 384 16 ) ( 336 385 16 ) __TB_empty 16 0 0 1 1
( 416 416 32 ) ( 416 417 32 ) ( 417 416 32 ) __TB_empty 16 0 0 1 1
( 416 416 32 ) ( 417 416 32 ) ( 416 416 33 ) __TB_empty 16 0 0 1 1
( 416 416 32 ) ( 416 416 33 ) ( 416 417 32 ) __TB_empty 0 0 0 1 1
}
}
// entity 11
{
"classname" "light_omni"
"origin" "312 232 40"
}
// entity 12
{
"classname" "light_omni"
"origin" "408 280 40"
}
// entity 13
{
"classname" "light_omni"
"origin" "408 168 40"
}
// entity 14
{
"classname" "light_omni"
"origin" "504 184 40"
}
// entity 15
{
"classname" "light_omni"
"origin" "376 104 40"
}
// entity 16
{
"classname" "light_omni"
"origin" "488 264 40"
}
// entity 17
{
"classname" "light_omni"
"origin" "488 328 40"
}
// entity 18
{
"classname" "light_omni"
"origin" "488 408 40"
}
// entity 19
{
"classname" "actor_barrel_1"
"origin" "184 504 24"
}
// entity 20
{
"classname" "actor_barrel_1"
"origin" "184 520 24"
}
// entity 21
{
"classname" "actor_barrel_1"
"origin" "184 536 24"
}
// entity 22
{
"classname" "actor_barrel_1"
"origin" "232 536 24"
}

View file

@ -0,0 +1,22 @@
[gd_scene load_steps=3 format=3 uid="uid://c2enjjxlfb5or"]
[ext_resource type="Texture2D" uid="uid://du8xcvbnf30o2" path="res://ExternalMaterial/Barrel/Barrels.png" id="1_2libs"]
[sub_resource type="CylinderShape3D" id="CylinderShape3D_2libs"]
height = 0.564575
radius = 0.321777
[node name="StaticBody3D" type="StaticBody3D"]
collision_layer = 16
collision_mask = 0
[node name="Barrel" type="Sprite3D" parent="."]
transform = Transform3D(0.707107, -0.5, 0.5, 0, 0.707107, 0.707107, -0.707107, -0.5, 0.5, 0, 0, 0)
pixel_size = 0.05
texture_filter = 0
texture = ExtResource("1_2libs")
hframes = 4
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0376587, 0)
shape = SubResource("CylinderShape3D_2libs")

View file

@ -0,0 +1,17 @@
[gd_scene load_steps=3 format=3 uid="uid://cq6tw87ei4by3"]
[sub_resource type="BoxShape3D" id="BoxShape3D_0vufj"]
size = Vector3(1, 0.101501, 1)
[sub_resource type="BoxMesh" id="BoxMesh_wl3wm"]
[node name="Elevator" type="AnimatableBody3D"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0038147, 0)
shape = SubResource("BoxShape3D_0vufj")
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.1, 0, 0, 0, 1, 0, 0, 0)
mesh = SubResource("BoxMesh_wl3wm")
skeleton = NodePath("../..")

View file

@ -0,0 +1,25 @@
[gd_resource type="Resource" script_class="FuncGodotFGDPointClass" load_steps=4 format=3 uid="uid://2j6k1gmnqqps"]
[ext_resource type="Resource" uid="uid://5bc1qysixhmh" path="res://3D/TrenchBroom/EntityDefinitions/base/actor_base.tres" id="1_gqx5a"]
[ext_resource type="Script" uid="uid://c83r7t467hm4m" path="res://addons/func_godot/src/fgd/func_godot_fgd_point_class.gd" id="1_mixsm"]
[ext_resource type="PackedScene" uid="uid://c2enjjxlfb5or" path="res://3D/Scenes/Props/barrel_3d.tscn" id="2_5uiix"]
[resource]
script = ExtResource("1_mixsm")
scene_file = ExtResource("2_5uiix")
apply_rotation_on_map_build = false
apply_scale_on_map_build = false
classname = "actor_barrel_1"
description = "Explosive Barrel Type 1"
func_godot_internal = false
base_classes = Array[Resource]([ExtResource("1_gqx5a")])
class_properties = {}
class_property_descriptions = {}
auto_apply_to_matching_node_properties = false
meta_properties = {
"model": "\"3D/MapModels/Barrel3DModel.glb\"",
"size": AABB(-8, -8, -8, 8, 8, 8)
}
node_class = ""
name_property = ""
metadata/_custom_type_script = "uid://c83r7t467hm4m"

View file

@ -0,0 +1,25 @@
[gd_resource type="Resource" script_class="FuncGodotFGDPointClass" load_steps=4 format=3 uid="uid://jn17j3xk5f3m"]
[ext_resource type="Resource" uid="uid://5bc1qysixhmh" path="res://3D/TrenchBroom/EntityDefinitions/base/actor_base.tres" id="1_opmpi"]
[ext_resource type="PackedScene" uid="uid://c2enjjxlfb5or" path="res://3D/Scenes/Props/barrel_3d.tscn" id="2_d6vd7"]
[ext_resource type="Script" uid="uid://c83r7t467hm4m" path="res://addons/func_godot/src/fgd/func_godot_fgd_point_class.gd" id="3_t8pgb"]
[resource]
script = ExtResource("3_t8pgb")
scene_file = ExtResource("2_d6vd7")
apply_rotation_on_map_build = false
apply_scale_on_map_build = false
classname = "actor_elevator_1"
description = "Elevator Type 1"
func_godot_internal = false
base_classes = Array[Resource]([ExtResource("1_opmpi")])
class_properties = {}
class_property_descriptions = {}
auto_apply_to_matching_node_properties = false
meta_properties = {
"model": "\"3D/MapModels/Barrel3DModel.glb\"",
"size": AABB(-8, -8, -8, 8, 8, 8)
}
node_class = ""
name_property = ""
metadata/_custom_type_script = "uid://c83r7t467hm4m"

View file

@ -0,0 +1,39 @@
[gd_resource type="Resource" script_class="FuncGodotFGDSolidClass" load_steps=4 format=3 uid="uid://cqyc33bbc701f"]
[ext_resource type="Script" uid="uid://msq50x6rk4po" path="res://addons/func_godot/src/fgd/func_godot_fgd_solid_class.gd" id="1_oh5jt"]
[ext_resource type="Resource" uid="uid://ermxog0n4mvn" path="res://3D/TrenchBroom/EntityDefinitions/base/trigger_base.tres" id="1_xcmav"]
[ext_resource type="Script" uid="uid://dp6h7yqh8x1gv" path="res://3D/TrenchBroom/EntityScripts/Triggers/trigger_area.gd" id="3_5p7mv"]
[resource]
script = ExtResource("1_oh5jt")
spawn_type = 2
origin_type = 4
build_visuals = false
use_in_baked_light = false
shadow_casting_setting = 0
build_occlusion = false
render_layers = 0
collision_shape_type = 1
collision_layer = 4
collision_mask = 4
collision_priority = 1.0
collision_shape_margin = 0.04
add_textures_metadata = false
add_vertex_metadata = false
add_face_position_metadata = false
add_face_normal_metadata = false
add_collision_shape_face_range_metadata = false
script_class = ExtResource("3_5p7mv")
classname = "trigger_area"
description = "Area node that activates its target group when entered."
func_godot_internal = false
base_classes = Array[Resource]([ExtResource("1_xcmav")])
class_properties = {}
class_property_descriptions = {}
auto_apply_to_matching_node_properties = false
meta_properties = {
"color": Color(0.8, 0, 0.8, 1)
}
node_class = "Area3D"
name_property = ""
metadata/_custom_type_script = "uid://msq50x6rk4po"

View file

@ -0,0 +1,46 @@
@tool
class_name TriggerArea
extends Area3D
@export var target: String = ""
@export var targetfunc: String = ""
@export var targetname: String = ""
enum TriggerStates {
READY,
USED
}
var trigger_state: TriggerStates = TriggerStates.READY
var timeout: float = 0.0
var last_activator: Node = null
func _func_godot_apply_properties(props: Dictionary) -> void:
target = props["target"] as String
targetfunc = props["targetfunc"] as String
targetname = props["targetname"] as String
func toggle_collision(toggle: bool) -> void:
for child in get_children():
if child is CollisionShape3D:
child.set_deferred("disabled", !toggle)
func use() -> void:
if trigger_state == TriggerStates.READY:
trigger_state = TriggerStates.USED
toggle_collision(false)
TBGAME.use_targets(self, target)
func _on_ent_entered(ent: Node) -> void:
if trigger_state == TriggerStates.READY:
if ent.is_in_group("PLAYER"):
call("use")
func _init() -> void:
monitoring = true
monitorable = false
connect("body_entered", _on_ent_entered)
func _ready() -> void:
if Engine.is_editor_hint():
return
TBGAME.set_targetname(self, targetname)

View file

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

View file

@ -1,11 +1,10 @@
[gd_resource type="Resource" script_class="FuncGodotFGDFile" load_steps=8 format=3 uid="uid://cxqi6r6nblcn3"]
[gd_resource type="Resource" script_class="FuncGodotFGDFile" load_steps=7 format=3 uid="uid://cxqi6r6nblcn3"]
[ext_resource type="Resource" uid="uid://nayxb8n7see2" path="res://addons/func_godot/fgd/phong_base.tres" id="1_24lxq"]
[ext_resource type="Resource" uid="uid://onsfttdpojex" path="res://3D/TrenchBroom/fgd_base.tres" id="1_dlwdq"]
[ext_resource type="Resource" uid="uid://dgkdkac8ppgnq" path="res://3D/TrenchBroom/fgd_solid.tres" id="2_bci5m"]
[ext_resource type="Resource" uid="uid://bdji3873bg32h" path="res://addons/func_godot/fgd/worldspawn.tres" id="2_dlwdq"]
[ext_resource type="Resource" uid="uid://b700sa4be6dfa" path="res://3D/TrenchBroom/fgd_point.tres" id="3_0gbih"]
[ext_resource type="Resource" uid="uid://ch3e0dix85uhb" path="res://addons/func_godot/fgd/func_detail_illusionary.tres" id="5_7icdq"]
[ext_resource type="Script" uid="uid://cknmd0lgmorx2" path="res://addons/func_godot/src/fgd/func_godot_fgd_file.gd" id="7_m2ebq"]
[resource]
@ -14,4 +13,4 @@ export_file = false
target_map_editor = 1
fgd_name = "FuncGodot"
base_fgd_files = Array[Resource]([ExtResource("1_dlwdq"), ExtResource("2_bci5m"), ExtResource("3_0gbih")])
entity_definitions = Array[Resource]([ExtResource("1_24lxq"), ExtResource("2_dlwdq"), ExtResource("5_7icdq")])
entity_definitions = Array[Resource]([ExtResource("1_24lxq"), ExtResource("2_dlwdq")])

View file

@ -1,8 +1,9 @@
[gd_resource type="Resource" script_class="FuncGodotFGDFile" load_steps=4 format=3 uid="uid://b700sa4be6dfa"]
[gd_resource type="Resource" script_class="FuncGodotFGDFile" load_steps=5 format=3 uid="uid://b700sa4be6dfa"]
[ext_resource type="Resource" uid="uid://ia1t5p4mhom3" path="res://3D/TrenchBroom/EntityDefinitions/point/lights/light_omni.tres" id="1_7vcj1"]
[ext_resource type="Script" uid="uid://cknmd0lgmorx2" path="res://addons/func_godot/src/fgd/func_godot_fgd_file.gd" id="1_lykim"]
[ext_resource type="Resource" uid="uid://ctrecvowhcqx0" path="res://3D/TrenchBroom/EntityDefinitions/point/lights/light_spot.tres" id="2_u7uvb"]
[ext_resource type="Resource" uid="uid://2j6k1gmnqqps" path="res://3D/TrenchBroom/EntityDefinitions/point/actors/actor_barrel.tres" id="3_u7uvb"]
[resource]
script = ExtResource("1_lykim")
@ -10,5 +11,5 @@ export_file = false
target_map_editor = 1
fgd_name = "FuncGodot"
base_fgd_files = Array[Resource]([])
entity_definitions = Array[Resource]([ExtResource("1_7vcj1"), ExtResource("2_u7uvb")])
entity_definitions = Array[Resource]([ExtResource("1_7vcj1"), ExtResource("2_u7uvb"), ExtResource("3_u7uvb")])
metadata/_custom_type_script = "uid://cknmd0lgmorx2"

View file

@ -1,10 +1,11 @@
[gd_resource type="Resource" script_class="FuncGodotFGDFile" load_steps=6 format=3 uid="uid://dgkdkac8ppgnq"]
[gd_resource type="Resource" script_class="FuncGodotFGDFile" load_steps=7 format=3 uid="uid://dgkdkac8ppgnq"]
[ext_resource type="Script" uid="uid://cknmd0lgmorx2" path="res://addons/func_godot/src/fgd/func_godot_fgd_file.gd" id="1_jws5j"]
[ext_resource type="Resource" uid="uid://cxy7jnh6d7msn" path="res://addons/func_godot/fgd/func_detail.tres" id="1_rbohd"]
[ext_resource type="Resource" uid="uid://ch3e0dix85uhb" path="res://addons/func_godot/fgd/func_detail_illusionary.tres" id="2_1pqwq"]
[ext_resource type="Resource" uid="uid://b70vf4t5dc70t" path="res://addons/func_godot/fgd/func_geo.tres" id="3_ire2f"]
[ext_resource type="Resource" uid="uid://dg5x44cc7flew" path="res://addons/func_godot/fgd/func_illusionary.tres" id="4_h7bc3"]
[ext_resource type="Resource" uid="uid://cqyc33bbc701f" path="res://3D/TrenchBroom/EntityDefinitions/solid/triggers/trigger_area.tres" id="5_1pqwq"]
[resource]
script = ExtResource("1_jws5j")
@ -12,5 +13,5 @@ export_file = false
target_map_editor = 1
fgd_name = "FuncGodot"
base_fgd_files = Array[Resource]([])
entity_definitions = Array[Resource]([ExtResource("1_rbohd"), ExtResource("2_1pqwq"), ExtResource("3_ire2f"), ExtResource("4_h7bc3")])
entity_definitions = Array[Resource]([ExtResource("1_rbohd"), ExtResource("2_1pqwq"), ExtResource("3_ire2f"), ExtResource("4_h7bc3"), ExtResource("5_1pqwq")])
metadata/_custom_type_script = "uid://cknmd0lgmorx2"