Made and scripted a generator key that modifies the variable to be able to turn on the generator using the panel

This commit is contained in:
2024-07-17 21:22:04 -05:00
parent 1a6a94d02b
commit abc319836f
5 changed files with 77 additions and 0 deletions

18
Assets/Objects/Key.tscn Normal file
View File

@ -0,0 +1,18 @@
[gd_scene load_steps=4 format=3 uid="uid://caej6l75lgmkp"]
[ext_resource type="Script" path="res://Assets/scripts/generator_key.gd" id="1_biiwx"]
[ext_resource type="PackedScene" uid="uid://byuejbs64ow32" path="res://Blender Files/Objects/Key.blend" id="1_kvtkd"]
[sub_resource type="BoxShape3D" id="BoxShape3D_e8fvw"]
size = Vector3(0.0746536, 0.0574341, 0.116943)
[node name="StaticBody3D" type="StaticBody3D"]
collision_layer = 4
script = ExtResource("1_biiwx")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.000476837, 0.0148621, -0.0220947)
shape = SubResource("BoxShape3D_e8fvw")
[node name="Key" parent="." instance=ExtResource("1_kvtkd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.00731428, 0)

View File

@ -0,0 +1,9 @@
extends StaticBody3D
@export var promt_message:String = "Pickup Key"
@export var promt_key:String
func interact(player):
GlobalSettings.HasGeneratorKey = true
#Play Pickup sound
queue_free()

Binary file not shown.

View File

@ -0,0 +1,50 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://byuejbs64ow32"
path="res://.godot/imported/Key.blend-24d3ab0fd405c7947ac651fe7098f890.scn"
[deps]
source_file="res://Blender Files/Objects/Key.blend"
dest_files=["res://.godot/imported/Key.blend-24d3ab0fd405c7947ac651fe7098f890.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/apply_root_scale=true
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path=""
_subresources={}
gltf/naming_version=1
gltf/embedded_image_handling=1
blender/nodes/visible=0
blender/nodes/punctual_lights=true
blender/nodes/cameras=true
blender/nodes/custom_properties=true
blender/nodes/modifiers=1
blender/meshes/colors=false
blender/meshes/uvs=true
blender/meshes/normals=true
blender/meshes/tangents=true
blender/meshes/skins=2
blender/meshes/export_bones_deforming_mesh_only=false
blender/materials/unpack_enabled=true
blender/materials/export_materials=1
blender/animation/limit_playback=true
blender/animation/always_sample=true
blender/animation/group_tracks=true

Binary file not shown.