Files
fps_project_1/assets/player.tscn
derek 3a450169c0 item pickup work
added extra stop before player eats the item so you can see what you've gathered
2024-10-01 17:02:40 -05:00

167 lines
6.5 KiB
Plaintext

[gd_scene load_steps=19 format=3 uid="uid://drwae3loscbw7"]
[ext_resource type="Script" path="res://scripts/player.gd" id="1_x7wms"]
[ext_resource type="PackedScene" uid="uid://dcmno6wafk5hg" path="res://assets/dead_player.tscn" id="2_4hoys"]
[ext_resource type="FontFile" uid="uid://d2h2tjhxiv5wo" path="res://assets/fonts/White On Black.ttf" id="3_mbuvp"]
[ext_resource type="Script" path="res://scripts/AmmoCounter.gd" id="4_8cy44"]
[ext_resource type="Texture2D" uid="uid://mcay8s80071h" path="res://assets/UI/Crosshair/SVG/Reticle 1_svg.svg" id="6_5m60e"]
[ext_resource type="Script" path="res://scripts/StaminaCounter.gd" id="6_bgi8o"]
[ext_resource type="Script" path="res://scripts/UIScreenAdjust.gd" id="7_pnp4a"]
[ext_resource type="AudioStream" uid="uid://bki17g7j4kqn4" path="res://assets/Audio/PickupSound Mixdown 3.wav" id="8_dwqsx"]
[ext_resource type="Texture2D" uid="uid://dhgyj08g1ge2o" path="res://assets/UI/SVG/hitmarkersvg.svg" id="8_kupqh"]
[ext_resource type="AudioStream" uid="uid://dyd272r7n2ecd" path="res://assets/Audio/footsteps-shoes-jump-land-beach-sand-SBA-300118001.wav" id="10_tn0pn"]
[ext_resource type="AudioStream" uid="uid://bl8yg1d3bsxs3" path="res://assets/Audio/constant-natural-strong-wind-looping-SBA-300062687.wav" id="11_he7p5"]
[ext_resource type="AudioStream" uid="uid://cy150nsjqp7lt" path="res://assets/Audio/grunt-male-SBA-300282985.wav" id="12_f51u4"]
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_l5ga0"]
blend_mode = 1
[sub_resource type="CapsuleMesh" id="CapsuleMesh_n7uf3"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_ko22d"]
radius = 0.509802
height = 2.03547
[sub_resource type="LabelSettings" id="LabelSettings_n0odj"]
font = ExtResource("3_mbuvp")
font_size = 115
shadow_size = 16
shadow_color = Color(0, 0, 0, 1)
[sub_resource type="BoxShape3D" id="BoxShape3D_nfpjw"]
size = Vector3(3, 3.58057, 3)
[sub_resource type="SphereShape3D" id="SphereShape3D_xfie3"]
radius = 7.0
[node name="Player" type="CharacterBody3D" node_paths=PackedStringArray("weapon_holder") groups=["player"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.11359, 0)
collision_layer = 126
collision_mask = 11
safe_margin = 0.5
script = ExtResource("1_x7wms")
dead_player = ExtResource("2_4hoys")
SENSITIVITY = 0.008
BOB_AMP = 0.085
weapon_holder = NodePath("Head/Camera3D/WeaponHolder")
[node name="HealthIndicator" type="ColorRect" parent="."]
material = SubResource("CanvasItemMaterial_l5ga0")
offset_right = 40.0
offset_bottom = 40.0
color = Color(0.470588, 0, 0, 0)
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
visible = false
mesh = SubResource("CapsuleMesh_n7uf3")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("CapsuleShape3D_ko22d")
[node name="Head" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.894364, 0)
[node name="Camera3D" type="Camera3D" parent="Head"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0341401, 0.111267)
current = true
[node name="WeaponHolder" type="Node3D" parent="Head/Camera3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.0341401, -0.111267)
[node name="WeaponSpawner" type="Node3D" parent="Head/Camera3D/WeaponHolder"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.269894, -0.199195, -0.580209)
[node name="AmmoCounter" type="Label" parent="Head/Camera3D"]
offset_right = 3840.0
offset_bottom = 2160.0
size_flags_horizontal = 3
size_flags_vertical = 6
text = "Ammo: X"
label_settings = SubResource("LabelSettings_n0odj")
horizontal_alignment = 2
vertical_alignment = 2
script = ExtResource("4_8cy44")
padding_amount = 0.025
[node name="StaminaCounter" type="Label" parent="Head/Camera3D"]
offset_right = 3440.0
offset_bottom = 1440.0
size_flags_horizontal = 3
size_flags_vertical = 6
text = "stamina: X"
label_settings = SubResource("LabelSettings_n0odj")
vertical_alignment = 2
script = ExtResource("6_bgi8o")
padding_amount = 0.025
[node name="GunRay" type="RayCast3D" parent="Head/Camera3D" groups=["gun_ray"]]
transform = Transform3D(0.977933, 0, -0.208919, 0, 1, 7.45058e-09, 0.208919, 0, 0.977933, 0, -0.197421, -0.129669)
target_position = Vector3(0, 0, -1.2)
hit_back_faces = false
[node name="AudioListener3D" type="AudioListener3D" parent="Head/Camera3D"]
transform = Transform3D(1, 0, 0, 0, 0.992332, 0.123601, 0, -0.123601, 0.992332, 0, -0.921646, -0.000722691)
[node name="Crosshair" type="TextureRect" parent="Head/Camera3D"]
offset_right = 40.0
offset_bottom = 40.0
texture = ExtResource("6_5m60e")
script = ExtResource("7_pnp4a")
[node name="Hitmarker" type="TextureRect" parent="Head/Camera3D"]
visible = false
offset_right = 40.0
offset_bottom = 40.0
texture = ExtResource("8_kupqh")
script = ExtResource("7_pnp4a")
[node name="BulletRay" type="RayCast3D" parent="Head/Camera3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.89879)
target_position = Vector3(0, 0, -200)
collision_mask = 5
collide_with_areas = true
[node name="InteractRay" type="RayCast3D" parent="Head/Camera3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.0521634, -0.764677)
target_position = Vector3(0, 0, -3)
collision_mask = 2
hit_from_inside = true
collide_with_areas = true
[node name="ItemHolder" type="Node3D" parent="Head"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.47261, -2)
[node name="pick_up_detection" type="Area3D" parent="."]
collision_layer = 0
collision_mask = 16
[node name="CollisionShape3D2" type="CollisionShape3D" parent="pick_up_detection"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0810862, 0.330574, -0.138576)
shape = SubResource("BoxShape3D_nfpjw")
[node name="pick_up_magnet" type="Area3D" parent="."]
collision_layer = 0
collision_mask = 16
[node name="CollisionShape3D" type="CollisionShape3D" parent="pick_up_magnet"]
shape = SubResource("SphereShape3D_xfie3")
[node name="Audio" type="Node" parent="."]
[node name="PickupSound" type="AudioStreamPlayer" parent="Audio"]
stream = ExtResource("8_dwqsx")
[node name="LandSound" type="AudioStreamPlayer" parent="Audio"]
stream = ExtResource("10_tn0pn")
volume_db = -5.0
[node name="EarWind" type="AudioStreamPlayer" parent="Audio"]
stream = ExtResource("11_he7p5")
[node name="Hurt" type="AudioStreamPlayer" parent="Audio"]
stream = ExtResource("12_f51u4")
[connection signal="tree_entered" from="." to="." method="_on_tree_entered"]
[connection signal="body_entered" from="pick_up_detection" to="." method="_on_pick_up_detection_body_entered"]
[connection signal="body_entered" from="pick_up_magnet" to="." method="_on_pick_up_magnet_body_entered"]