more various tweaks to held items and chests in order to make carrying chests fun

This commit is contained in:
derek
2025-03-04 17:02:52 -06:00
parent e84aea9ef7
commit 5d989470a6
20 changed files with 111 additions and 106 deletions

View File

@@ -3,25 +3,26 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://b73sneqhodmjy" uid="uid://b73sneqhodmjy"
path="res://.godot/imported/chest1-low_chest1.hinge_BaseColor.png-e677c1ec48f3117604ffc73d36f4d0dc.ctex" path.s3tc="res://.godot/imported/chest1-low_chest1.hinge_BaseColor.png-e677c1ec48f3117604ffc73d36f4d0dc.s3tc.ctex"
metadata={ metadata={
"vram_texture": false "imported_formats": ["s3tc_bptc"],
"vram_texture": true
} }
[deps] [deps]
source_file="res://assets/Models/SubstancePainterTest/chest1-low_chest1.hinge_BaseColor.png" source_file="res://assets/Models/SubstancePainterTest/chest1-low_chest1.hinge_BaseColor.png"
dest_files=["res://.godot/imported/chest1-low_chest1.hinge_BaseColor.png-e677c1ec48f3117604ffc73d36f4d0dc.ctex"] dest_files=["res://.godot/imported/chest1-low_chest1.hinge_BaseColor.png-e677c1ec48f3117604ffc73d36f4d0dc.s3tc.ctex"]
[params] [params]
compress/mode=0 compress/mode=2
compress/high_quality=false compress/high_quality=false
compress/lossy_quality=0.7 compress/lossy_quality=0.7
compress/hdr_compression=1 compress/hdr_compression=1
compress/normal_map=0 compress/normal_map=0
compress/channel_pack=0 compress/channel_pack=0
mipmaps/generate=false mipmaps/generate=true
mipmaps/limit=-1 mipmaps/limit=-1
roughness/mode=0 roughness/mode=0
roughness/src_normal="" roughness/src_normal=""
@@ -31,4 +32,4 @@ process/normal_map_invert_y=false
process/hdr_as_srgb=false process/hdr_as_srgb=false
process/hdr_clamp_exposure=false process/hdr_clamp_exposure=false
process/size_limit=0 process/size_limit=0
detect_3d/compress_to=1 detect_3d/compress_to=0

View File

@@ -3,25 +3,26 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://bcswxt834jvxj" uid="uid://bcswxt834jvxj"
path="res://.godot/imported/chest1-low_chest1.hinge_Metallic.png-1bc29fbc5c7821edb88a7df25acda950.ctex" path.s3tc="res://.godot/imported/chest1-low_chest1.hinge_Metallic.png-1bc29fbc5c7821edb88a7df25acda950.s3tc.ctex"
metadata={ metadata={
"vram_texture": false "imported_formats": ["s3tc_bptc"],
"vram_texture": true
} }
[deps] [deps]
source_file="res://assets/Models/SubstancePainterTest/chest1-low_chest1.hinge_Metallic.png" source_file="res://assets/Models/SubstancePainterTest/chest1-low_chest1.hinge_Metallic.png"
dest_files=["res://.godot/imported/chest1-low_chest1.hinge_Metallic.png-1bc29fbc5c7821edb88a7df25acda950.ctex"] dest_files=["res://.godot/imported/chest1-low_chest1.hinge_Metallic.png-1bc29fbc5c7821edb88a7df25acda950.s3tc.ctex"]
[params] [params]
compress/mode=0 compress/mode=2
compress/high_quality=false compress/high_quality=false
compress/lossy_quality=0.7 compress/lossy_quality=0.7
compress/hdr_compression=1 compress/hdr_compression=1
compress/normal_map=0 compress/normal_map=0
compress/channel_pack=0 compress/channel_pack=0
mipmaps/generate=false mipmaps/generate=true
mipmaps/limit=-1 mipmaps/limit=-1
roughness/mode=0 roughness/mode=0
roughness/src_normal="" roughness/src_normal=""
@@ -31,4 +32,4 @@ process/normal_map_invert_y=false
process/hdr_as_srgb=false process/hdr_as_srgb=false
process/hdr_clamp_exposure=false process/hdr_clamp_exposure=false
process/size_limit=0 process/size_limit=0
detect_3d/compress_to=1 detect_3d/compress_to=0

View File

@@ -3,32 +3,33 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://4y2wbs6slkfu" uid="uid://4y2wbs6slkfu"
path="res://.godot/imported/chest1-low_chest1.hinge_Normal.png-30813dfd50661662f810997b943193fb.ctex" path.s3tc="res://.godot/imported/chest1-low_chest1.hinge_Normal.png-30813dfd50661662f810997b943193fb.s3tc.ctex"
metadata={ metadata={
"vram_texture": false "imported_formats": ["s3tc_bptc"],
"vram_texture": true
} }
[deps] [deps]
source_file="res://assets/Models/SubstancePainterTest/chest1-low_chest1.hinge_Normal.png" source_file="res://assets/Models/SubstancePainterTest/chest1-low_chest1.hinge_Normal.png"
dest_files=["res://.godot/imported/chest1-low_chest1.hinge_Normal.png-30813dfd50661662f810997b943193fb.ctex"] dest_files=["res://.godot/imported/chest1-low_chest1.hinge_Normal.png-30813dfd50661662f810997b943193fb.s3tc.ctex"]
[params] [params]
compress/mode=0 compress/mode=2
compress/high_quality=false compress/high_quality=false
compress/lossy_quality=0.7 compress/lossy_quality=0.7
compress/hdr_compression=1 compress/hdr_compression=1
compress/normal_map=0 compress/normal_map=1
compress/channel_pack=0 compress/channel_pack=0
mipmaps/generate=false mipmaps/generate=true
mipmaps/limit=-1 mipmaps/limit=-1
roughness/mode=0 roughness/mode=1
roughness/src_normal="" roughness/src_normal="res://assets/Models/SubstancePainterTest/chest1-low_chest1.hinge_Normal.png"
process/fix_alpha_border=true process/fix_alpha_border=true
process/premult_alpha=false process/premult_alpha=false
process/normal_map_invert_y=false process/normal_map_invert_y=false
process/hdr_as_srgb=false process/hdr_as_srgb=false
process/hdr_clamp_exposure=false process/hdr_clamp_exposure=false
process/size_limit=0 process/size_limit=0
detect_3d/compress_to=1 detect_3d/compress_to=0

View File

@@ -3,25 +3,26 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://b0ewa0o07myc3" uid="uid://b0ewa0o07myc3"
path="res://.godot/imported/chest1-low_chest1.hinge_Roughness.png-50fe5877654c56f190396d2b8bb420a9.ctex" path.s3tc="res://.godot/imported/chest1-low_chest1.hinge_Roughness.png-50fe5877654c56f190396d2b8bb420a9.s3tc.ctex"
metadata={ metadata={
"vram_texture": false "imported_formats": ["s3tc_bptc"],
"vram_texture": true
} }
[deps] [deps]
source_file="res://assets/Models/SubstancePainterTest/chest1-low_chest1.hinge_Roughness.png" source_file="res://assets/Models/SubstancePainterTest/chest1-low_chest1.hinge_Roughness.png"
dest_files=["res://.godot/imported/chest1-low_chest1.hinge_Roughness.png-50fe5877654c56f190396d2b8bb420a9.ctex"] dest_files=["res://.godot/imported/chest1-low_chest1.hinge_Roughness.png-50fe5877654c56f190396d2b8bb420a9.s3tc.ctex"]
[params] [params]
compress/mode=0 compress/mode=2
compress/high_quality=false compress/high_quality=false
compress/lossy_quality=0.7 compress/lossy_quality=0.7
compress/hdr_compression=1 compress/hdr_compression=1
compress/normal_map=0 compress/normal_map=0
compress/channel_pack=0 compress/channel_pack=0
mipmaps/generate=false mipmaps/generate=true
mipmaps/limit=-1 mipmaps/limit=-1
roughness/mode=0 roughness/mode=0
roughness/src_normal="" roughness/src_normal=""
@@ -31,4 +32,4 @@ process/normal_map_invert_y=false
process/hdr_as_srgb=false process/hdr_as_srgb=false
process/hdr_clamp_exposure=false process/hdr_clamp_exposure=false
process/size_limit=0 process/size_limit=0
detect_3d/compress_to=1 detect_3d/compress_to=0

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=38 format=3 uid="uid://drwae3loscbw7"] [gd_scene load_steps=37 format=3 uid="uid://drwae3loscbw7"]
[ext_resource type="Script" path="res://scripts/player.gd" id="1_x7wms"] [ext_resource type="Script" path="res://scripts/player.gd" id="1_x7wms"]
[ext_resource type="Script" path="res://scripts/recoil.gd" id="3_405jc"] [ext_resource type="Script" path="res://scripts/recoil.gd" id="3_405jc"]
@@ -7,7 +7,6 @@
[ext_resource type="PackedScene" uid="uid://br882tlh3cfwu" path="res://hud.tscn" id="5_yenaw"] [ext_resource type="PackedScene" uid="uid://br882tlh3cfwu" path="res://hud.tscn" id="5_yenaw"]
[ext_resource type="AudioStream" uid="uid://bki17g7j4kqn4" path="res://assets/Audio/PickupSound Mixdown 3.wav" id="8_dwqsx"] [ext_resource type="AudioStream" uid="uid://bki17g7j4kqn4" path="res://assets/Audio/PickupSound Mixdown 3.wav" id="8_dwqsx"]
[ext_resource type="Shader" path="res://assets/Shaders/speedlines.gdshader" id="10_5hu7c"] [ext_resource type="Shader" path="res://assets/Shaders/speedlines.gdshader" id="10_5hu7c"]
[ext_resource type="Script" path="res://scripts/bullet_ray.gd" id="10_ektr6"]
[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://dyd272r7n2ecd" path="res://assets/Audio/footsteps-shoes-jump-land-beach-sand-SBA-300118001.wav" id="10_tn0pn"]
[ext_resource type="AudioStream" uid="uid://cjpvibojo13qv" path="res://assets/Audio/clock-ticking-exact-looping-SBA-300062891.wav" id="11_6k4fy"] [ext_resource type="AudioStream" uid="uid://cjpvibojo13qv" path="res://assets/Audio/clock-ticking-exact-looping-SBA-300062891.wav" id="11_6k4fy"]
[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://bl8yg1d3bsxs3" path="res://assets/Audio/constant-natural-strong-wind-looping-SBA-300062687.wav" id="11_he7p5"]
@@ -222,7 +221,6 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.487738)
target_position = Vector3(0, 0, -200) target_position = Vector3(0, 0, -200)
collision_mask = 105 collision_mask = 105
collide_with_areas = true collide_with_areas = true
script = ExtResource("10_ektr6")
[node name="InteractRay" type="RayCast3D" parent="Head/Recoil/Camera3D"] [node name="InteractRay" type="RayCast3D" parent="Head/Recoil/Camera3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.00322104, -0.0232438) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.00322104, -0.0232438)

View File

@@ -21,7 +21,7 @@ recoil_amount = Vector3(0.05, 0.05, 0.05)
kick_amount = 0.1 kick_amount = 0.1
max_ammo = 20 max_ammo = 20
start_mags = 3 start_mags = 3
bullet_damage = 1 bullet_damage = 2
smoke_enabled = false smoke_enabled = false
bullet_force_mod = 5.0 bullet_force_mod = 5.0
bullet_speed = 600 bullet_speed = 600

View File

@@ -19,8 +19,8 @@ ads = false
recoil_amount = Vector3(0.05, 0.05, 0.05) recoil_amount = Vector3(0.05, 0.05, 0.05)
kick_amount = 0.1 kick_amount = 0.1
max_ammo = 6 max_ammo = 6
start_mags = 1 start_mags = 3
bullet_damage = 1 bullet_damage = 5
smoke_enabled = false smoke_enabled = false
bullet_force_mod = 5.0 bullet_force_mod = 5.0
bullet_speed = 1200 bullet_speed = 1200

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=43 format=4 uid="uid://diefmwmyoc5of"] [gd_scene load_steps=47 format=4 uid="uid://diefmwmyoc5of"]
[ext_resource type="Script" path="res://scripts/chest_1.gd" id="1_0qjnf"] [ext_resource type="Script" path="res://scripts/chest_1.gd" id="1_0qjnf"]
[ext_resource type="Texture2D" uid="uid://bpo5wltswxbfs" path="res://assets/Models/SubstancePainterTest/chest1-low_chest1.base_BaseColor.png" id="1_e8125"] [ext_resource type="Texture2D" uid="uid://bpo5wltswxbfs" path="res://assets/Models/SubstancePainterTest/chest1-low_chest1.base_BaseColor.png" id="1_e8125"]
@@ -20,6 +20,10 @@
[ext_resource type="Texture2D" uid="uid://wjqeybvbi584" path="res://assets/Models/SubstancePainterTest/chest1-low_chest1.lock_Normal.png" id="11_pdg8f"] [ext_resource type="Texture2D" uid="uid://wjqeybvbi584" path="res://assets/Models/SubstancePainterTest/chest1-low_chest1.lock_Normal.png" id="11_pdg8f"]
[ext_resource type="Texture2D" uid="uid://bq0glgbvc75ue" path="res://assets/Models/SubstancePainterTest/chest1-low_chest1.lock_Roughness.png" id="12_ei51g"] [ext_resource type="Texture2D" uid="uid://bq0glgbvc75ue" path="res://assets/Models/SubstancePainterTest/chest1-low_chest1.lock_Roughness.png" id="12_ei51g"]
[ext_resource type="Texture2D" uid="uid://d03e3v1yyks6l" path="res://assets/Models/SubstancePainterTest/chest1-low_chest1.band_Metallic.png" id="12_s5cat"] [ext_resource type="Texture2D" uid="uid://d03e3v1yyks6l" path="res://assets/Models/SubstancePainterTest/chest1-low_chest1.band_Metallic.png" id="12_s5cat"]
[ext_resource type="Texture2D" uid="uid://b73sneqhodmjy" path="res://assets/Models/SubstancePainterTest/chest1-low_chest1.hinge_BaseColor.png" id="13_qyl67"]
[ext_resource type="Texture2D" uid="uid://bcswxt834jvxj" path="res://assets/Models/SubstancePainterTest/chest1-low_chest1.hinge_Metallic.png" id="14_nq6gg"]
[ext_resource type="Texture2D" uid="uid://4y2wbs6slkfu" path="res://assets/Models/SubstancePainterTest/chest1-low_chest1.hinge_Normal.png" id="15_u8r22"]
[ext_resource type="Texture2D" uid="uid://b0ewa0o07myc3" path="res://assets/Models/SubstancePainterTest/chest1-low_chest1.hinge_Roughness.png" id="16_hltmh"]
[ext_resource type="Script" path="res://scripts/target_collision.gd" id="18_j3j81"] [ext_resource type="Script" path="res://scripts/target_collision.gd" id="18_j3j81"]
[ext_resource type="AudioStream" uid="uid://b7uv25xlfv41p" path="res://assets/Audio/Foley Inventory and Interactions/Foley Inventory and Interactions/Drop Item/Drop Metal A.wav" id="19_an6dy"] [ext_resource type="AudioStream" uid="uid://b7uv25xlfv41p" path="res://assets/Audio/Foley Inventory and Interactions/Foley Inventory and Interactions/Drop Item/Drop Metal A.wav" id="19_an6dy"]
[ext_resource type="AudioStream" uid="uid://dxoi2nyjbgbr6" path="res://assets/Audio/Foley Inventory and Interactions/Foley Inventory and Interactions/Drop Item/Drop Metal B.wav" id="20_52bd4"] [ext_resource type="AudioStream" uid="uid://dxoi2nyjbgbr6" path="res://assets/Audio/Foley Inventory and Interactions/Foley Inventory and Interactions/Drop Item/Drop Metal B.wav" id="20_52bd4"]
@@ -37,11 +41,16 @@ normal_texture = ExtResource("4_aqsid")
heightmap_texture = ExtResource("2_ioplr") heightmap_texture = ExtResource("2_ioplr")
texture_filter = 0 texture_filter = 0
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_utrnj"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_toyun"]
resource_name = "chest1.hinge" resource_name = "chest1.hinge"
cull_mode = 2 cull_mode = 2
albedo_color = Color(0.906332, 0.906332, 0.906332, 1) albedo_color = Color(0.906332, 0.906332, 0.906332, 1)
roughness = 0.5 albedo_texture = ExtResource("13_qyl67")
metallic = 1.0
metallic_texture = ExtResource("14_nq6gg")
roughness_texture = ExtResource("16_hltmh")
normal_enabled = true
normal_texture = ExtResource("15_u8r22")
[sub_resource type="ArrayMesh" id="ArrayMesh_8dop3"] [sub_resource type="ArrayMesh" id="ArrayMesh_8dop3"]
_surfaces = [{ _surfaces = [{
@@ -91,7 +100,7 @@ _surfaces = [{
"index_count": 168, "index_count": 168,
"index_data": PackedByteArray("AQAJAAQAAQAGAAkABwAQAAoABwANABAADAAWAA8ADAATABYAEgAcABUAEgAZABwAGAAhABsAGAAeACEAHwAnACIAHwAkACcAEQAFAAsABQApAC8AKQAdACMAHQARABcAEQApAAUAKQARAB0AJQAuACgAJQArAC4AKgADAC0AKgAAAAMALAAIAAIACAAUAA4AFAAgABoAIAAsACYALAAUAAgAFAAsACAAMQA5ADQAMQA2ADkANwBAADoANwA9AEAAPABGAD8APABDAEYAQgBMAEUAQgBJAEwASABRAEsASABOAFEATwBXAFIATwBUAFcAQQA1ADsANQBZAF8AWQBNAFMATQBBAEcAQQBZADUAWQBBAE0AVQBeAFgAVQBbAF4AWgAzAF0AWgAwADMAXAA4ADIAOABEAD4ARABQAEoAUABcAFYAXABEADgARABcAFAA"), "index_data": PackedByteArray("AQAJAAQAAQAGAAkABwAQAAoABwANABAADAAWAA8ADAATABYAEgAcABUAEgAZABwAGAAhABsAGAAeACEAHwAnACIAHwAkACcAEQAFAAsABQApAC8AKQAdACMAHQARABcAEQApAAUAKQARAB0AJQAuACgAJQArAC4AKgADAC0AKgAAAAMALAAIAAIACAAUAA4AFAAgABoAIAAsACYALAAUAAgAFAAsACAAMQA5ADQAMQA2ADkANwBAADoANwA9AEAAPABGAD8APABDAEYAQgBMAEUAQgBJAEwASABRAEsASABOAFEATwBXAFIATwBUAFcAQQA1ADsANQBZAF8AWQBNAFMATQBBAEcAQQBZADUAWQBBAE0AVQBeAFgAVQBbAF4AWgAzAF0AWgAwADMAXAA4ADIAOABEAD4ARABQAEoAUABcAFYAXABEADgARABcAFAA"),
"lods": [0.0181144, PackedByteArray("BgAQAAMABgANABAAKgAGAAMAKgADAC0ADAAbAA8ADAASABsAEgAnABsAEgAkACcABQApAC8AEQApAAUAKQARAB0AJQAuACgAJQArAC4ACAAUAA4ALAAUAAgAFAAsACYANgBAADMANgA9AEAAWgA2ADMAWgAzAF0APABLAD8APABCAEsAQgBXAEsAQgBUAFcANQBZAF8AQQBZADUAWQBBAE0AVQBeAFgAVQBbAF4AOABEAD4AXABEADgARABcAFYA")], "lods": [0.0181144, PackedByteArray("BgAQAAMABgANABAAKgAGAAMAKgADAC0ADAAbAA8ADAASABsAEgAnABsAEgAkACcABQApAC8AEQApAAUAKQARAB0AJQAuACgAJQArAC4ACAAUAA4ALAAUAAgAFAAsACYANgBAADMANgA9AEAAWgA2ADMAWgAzAF0APABLAD8APABCAEsAQgBXAEsAQgBUAFcANQBZAF8AQQBZADUAWQBBAE0AVQBeAFgAVQBbAF4AOABEAD4AXABEADgARABcAFYA")],
"material": SubResource("StandardMaterial3D_utrnj"), "material": SubResource("StandardMaterial3D_toyun"),
"name": "chest1.hinge", "name": "chest1.hinge",
"primitive": 3, "primitive": 3,
"uv_scale": Vector4(2, 2, 0, 0), "uv_scale": Vector4(2, 2, 0, 0),

View File

@@ -11,7 +11,7 @@ config_version=5
[application] [application]
config/name="First Person Test" config/name="First Person Test"
run/main_scene="res://scenes/asset_checker.tscn" run/main_scene="res://assets/blockout_2.tscn"
config/features=PackedStringArray("4.3", "Forward Plus") config/features=PackedStringArray("4.3", "Forward Plus")
config/icon="res://icon.svg" config/icon="res://icon.svg"

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=25 format=3 uid="uid://jdwpc622vmok"] [gd_scene load_steps=21 format=3 uid="uid://jdwpc622vmok"]
[ext_resource type="Script" path="res://scripts/LevelManager.gd" id="1_1bnbi"] [ext_resource type="Script" path="res://scripts/LevelManager.gd" id="1_1bnbi"]
[ext_resource type="Resource" uid="uid://bxcxqt7rmfvdw" path="res://GameModes/hubworld.tres" id="2_62iy8"] [ext_resource type="Resource" uid="uid://bxcxqt7rmfvdw" path="res://GameModes/hubworld.tres" id="2_62iy8"]
@@ -17,10 +17,6 @@
[ext_resource type="PackedScene" uid="uid://bji3bukudxlhm" path="res://assets/health_dispenser.tscn" id="13_h5xga"] [ext_resource type="PackedScene" uid="uid://bji3bukudxlhm" path="res://assets/health_dispenser.tscn" id="13_h5xga"]
[ext_resource type="PackedScene" uid="uid://d4suhr3allsj" path="res://assets/revolver2_pickup.tscn" id="14_ak7yq"] [ext_resource type="PackedScene" uid="uid://d4suhr3allsj" path="res://assets/revolver2_pickup.tscn" id="14_ak7yq"]
[ext_resource type="PackedScene" uid="uid://dyu46bns8mesv" path="res://assets/mac10_pickup.tscn" id="17_u30rd"] [ext_resource type="PackedScene" uid="uid://dyu46bns8mesv" path="res://assets/mac10_pickup.tscn" id="17_u30rd"]
[ext_resource type="PackedScene" uid="uid://hp4xn8oqdxnd" path="res://assets/machete_pickup.tscn" id="19_po1ll"]
[ext_resource type="PackedScene" uid="uid://dugcxo2665me0" path="res://assets/revolver1_pickup.tscn" id="20_cte0x"]
[ext_resource type="PackedScene" uid="uid://cucqbjb8bcha5" path="res://assets/blunderbuss_pickup.tscn" id="21_7mdbv"]
[ext_resource type="PackedScene" uid="uid://clu76sc4uoswn" path="res://assets/rocketlauncher_pickup.tscn" id="21_8nq5q"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_s7e4t"] [sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_s7e4t"]
sky_top_color = Color(0.623488, 0.812575, 0.900791, 1) sky_top_color = Color(0.623488, 0.812575, 0.900791, 1)
@@ -265,17 +261,5 @@ item = ExtResource("17_u30rd")
item_name = "Mac 10" item_name = "Mac 10"
item_price = 100 item_price = 100
[node name="machete_pickup" parent="." instance=ExtResource("19_po1ll")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.62977, 0.478022, 7.20831)
[node name="pistol1_pickup" parent="." instance=ExtResource("20_cte0x")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -7.08118, 0.423819, 5.64694)
[node name="blunderbuss_pickup" parent="." instance=ExtResource("21_7mdbv")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -7.25088, 0.636966, 3.43924)
[node name="mac10_pickup" parent="." instance=ExtResource("17_u30rd")] [node name="mac10_pickup" parent="." instance=ExtResource("17_u30rd")]
transform = Transform3D(0.478002, 0.878359, 0, -0.878359, 0.478002, 0, 0, 0, 1, 4.01705, 1.63936, 8.05346) transform = Transform3D(-0.254518, -0.967068, 0, 0.967068, -0.254518, 0, 0, 0, 1, -7.54046, 1.3363, 3.95008)
[node name="rocketlauncher1_pickup" parent="." instance=ExtResource("21_8nq5q")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.72876, 1.17629, -7.85933)

View File

@@ -25,6 +25,9 @@ func _on_area_3d_body_entered(body):
if body.is_in_group("player"): if body.is_in_group("player"):
can_jump = true can_jump = true
player = body player = body
if body.is_class("Chest"):
body.velocity.y = jump_amount
jump_sound.play()
func _on_area_3d_body_exited(body: Node3D) -> void: func _on_area_3d_body_exited(body: Node3D) -> void:
if body.is_in_group("player"): if body.is_in_group("player"):

View File

@@ -1,6 +1,7 @@
extends RayCast3D extends RayCast3D
@onready var hit_indicator: AudioStreamPlayer = $"../../../../Audio/HitIndicator" @onready var hit_indicator: AudioStreamPlayer = $"../../../../Audio/HitIndicator"
@onready var camera: Camera3D = $".."
# Called when the node enters the scene tree for the first time. # Called when the node enters the scene tree for the first time.
@@ -12,31 +13,32 @@ func _ready() -> void:
func _process(delta: float) -> void: func _process(delta: float) -> void:
pass pass
func hitscan_fire(bullet_damage,bullet_force_mod,bullethole): func hitscan_fire(bullet_damage,bullet_force_mod,bullethole,range):
if is_colliding(): if is_colliding():
#bullethole effect if camera.distance_to(get_collision_point) <= range:
var instance_bullethole = bullethole.instantiate() #bullethole effect
get_collider().add_child(instance_bullethole) var instance_bullethole = bullethole.instantiate()
instance_bullethole.global_transform.origin = get_collision_point() get_collider().add_child(instance_bullethole)
if (abs(get_collision_normal().y) > 0.99): instance_bullethole.global_transform.origin = get_collision_point()
instance_bullethole.look_at(get_collision_point() + get_collision_normal(), Vector3(0,0,1)) if (abs(get_collision_normal().y) > 0.99):
else: instance_bullethole.look_at(get_collision_point() + get_collision_normal(), Vector3(0,0,1))
instance_bullethole.look_at(get_collision_point() + get_collision_normal()) else:
instance_bullethole.look_at(get_collision_point() + get_collision_normal())
#move rigidbodies
if get_collider().is_in_group("scene_rigidbody"): #move rigidbodies
get_collider().linear_velocity += rotation * Vector3(0,0,-bullet_force_mod) if get_collider().is_in_group("scene_rigidbody"):
get_collider().linear_velocity += rotation * Vector3(0,0,-bullet_force_mod)
if get_collider().is_in_group("breakable"):
get_collider().breaking( Vector3(0,0,-bullet_force_mod)) if get_collider().is_in_group("breakable"):
get_collider().breaking( Vector3(0,0,-bullet_force_mod))
if get_collider().is_in_group("enemy_target"):
emit_signal("enemy_hit")
get_collider().hit(bullet_damage)
if get_collider().is_in_group("switch"):
get_collider().hit()
if get_collider().is_in_group("enemy_target"):
emit_signal("enemy_hit")
get_collider().hit(bullet_damage)
if get_collider().is_in_group("switch"):
get_collider().hit()

View File

@@ -31,7 +31,7 @@ func _on_timer_timeout():
timer.wait_time = rand_timer #rand_timer timer.wait_time = rand_timer #rand_timer
# Shoot that shit # Shoot that shit
var pickup_spawn = level_control.item_pickup.instantiate() var pickup_spawn = level_control.ITEM_PICKUP.instantiate()
var item_stats = level_control.pickup_spawn(false) var item_stats = level_control.pickup_spawn(false)
##SET VARIABLES ##SET VARIABLES
pickup_spawn.pickup_type = item_stats["pickup_type"] pickup_spawn.pickup_type = item_stats["pickup_type"]

View File

@@ -1,6 +1,8 @@
extends RigidBody3D extends RigidBody3D
class_name Chest
@export var weapon_drops : Array[Resource] @export var weapon_drops : Array[Resource]
@export var health : float = 30
var open = false var open = false
var drop_weapon var drop_weapon
@@ -19,7 +21,8 @@ func _process(delta: float) -> void:
pass pass
func hit(dam): func hit(dam):
if !open: health -= dam
if !open and health <= 0:
anim_player.play("open") anim_player.play("open")
open = true open = true
@@ -31,4 +34,4 @@ func spawn_drop():
get_tree().current_scene.add_child(drop_weapon) get_tree().current_scene.add_child(drop_weapon)
func interact(): func interact():
hit(0) hit(1)

View File

@@ -86,6 +86,7 @@ var current_weapon_index
var recoiling = false var recoiling = false
var dead = false var dead = false
var hud_visible : bool = true var hud_visible : bool = true
var held_item : Node var held_item : Node
var held_item_linear_damp_cache var held_item_linear_damp_cache
var held_item_angular_damp_cache var held_item_angular_damp_cache
@@ -93,7 +94,8 @@ var held_item_gravity_cache
var held_item_mass_cache var held_item_mass_cache
var held_item_collision_cache var held_item_collision_cache
var hold_offset var hold_offset
var held_item_rotation = Vector3(0,0,0) var held_item_rotation : float = 0
var gamespeed_controlled = false var gamespeed_controlled = false
var crouched = false var crouched = false
var flashlight_on : bool = false var flashlight_on : bool = false
@@ -137,7 +139,6 @@ var controlled_elsewhere = false
@onready var weapon_pickup_audio: AudioStreamPlayer = $Audio/WeaponPickup @onready var weapon_pickup_audio: AudioStreamPlayer = $Audio/WeaponPickup
@onready var motion_lines: ColorRect = $Head/Recoil/Camera3D/MotionLines @onready var motion_lines: ColorRect = $Head/Recoil/Camera3D/MotionLines
@onready var moveable_holder: Node3D = $Head/Recoil/Camera3D/MoveableHolder @onready var moveable_holder: Node3D = $Head/Recoil/Camera3D/MoveableHolder
@onready var moveable_rotation: Node3D = $Head/Recoil/Camera3D/MoveableHolder/MoveableRotation
@onready var stand_check: RayCast3D = $StandCheck @onready var stand_check: RayCast3D = $StandCheck
@onready var r_hand_test: MeshInstance3D = $Head/Recoil/Camera3D/WeaponHolder/RHandTest @onready var r_hand_test: MeshInstance3D = $Head/Recoil/Camera3D/WeaponHolder/RHandTest
@onready var enemy_killed_audio: AudioStreamPlayer = $Audio/EnemyKilled @onready var enemy_killed_audio: AudioStreamPlayer = $Audio/EnemyKilled
@@ -405,13 +406,14 @@ func _physics_process(delta):
#Weapon Swap Up #Weapon Swap Up
if Input.is_action_just_pressed("scroll_up"): if Input.is_action_just_pressed("scroll_up"):
if held_item != null:
held_item_rotation += deg_to_rad(45)
print("HELD ITEM ROTATION : ",held_item_rotation)
if gun != null: if gun != null:
if !gun.anim_player.is_playing(): if !gun.anim_player.is_playing():
if held_item == null: if held_item == null:
if GameGlobals.held_guns.size() > 1: if GameGlobals.held_guns.size() > 1:
weapon_select(GameGlobals.current_gun_index + 1) weapon_select(GameGlobals.current_gun_index + 1)
else:
moveable_holder.rotation.y += deg_to_rad(45)
else: else:
if gun_is_holstered: if gun_is_holstered:
holster_gun(false) holster_gun(false)
@@ -424,7 +426,7 @@ func _physics_process(delta):
if GameGlobals.held_guns.size() > 1: if GameGlobals.held_guns.size() > 1:
weapon_select(GameGlobals.current_gun_index - 1) weapon_select(GameGlobals.current_gun_index - 1)
else: else:
moveable_holder.rotation.y -= deg_to_rad(45) held_item_rotation -= deg_to_rad(45)
else: else:
if gun_is_holstered: if gun_is_holstered:
holster_gun(false) holster_gun(false)
@@ -461,6 +463,12 @@ func _physics_process(delta):
held_key_check += delta held_key_check += delta
## IF HELD ## IF HELD
if held_key_check >= HELD_BUTTON_AMT: if held_key_check >= HELD_BUTTON_AMT:
if interact_ray.is_colliding():
var body = interact_ray.get_collider()
if interact_ray.get_collider().has_method("interact"):
body.interact()
held_key_check = 0.0
elif Input.is_action_just_released("interact"):
if held_item != null: if held_item != null:
release_moveable() release_moveable()
elif interact_ray.is_colliding(): elif interact_ray.is_colliding():
@@ -468,13 +476,6 @@ func _physics_process(delta):
if interact_ray.get_collider().get_class() == "RigidBody3D": if interact_ray.get_collider().get_class() == "RigidBody3D":
grab_moveable(body) grab_moveable(body)
held_key_check = 0.0 held_key_check = 0.0
elif Input.is_action_just_released("interact"):
if interact_ray.is_colliding():
var body = interact_ray.get_collider()
if interact_ray.get_collider().has_method("interact"):
body.interact()
held_key_check = 0.0
#kick #kick
if Input.is_action_just_pressed("kick"): if Input.is_action_just_pressed("kick"):
if !animation_player.is_playing(): if !animation_player.is_playing():
@@ -626,9 +627,8 @@ func hold_item(_delta):
if held_item != null: if held_item != null:
interact_ray.look_at(held_item.global_position, Vector3.UP) interact_ray.look_at(held_item.global_position, Vector3.UP)
var held_dir = (moveable_holder.global_position - held_item.global_position) #+ hold_offset var held_dir = (moveable_holder.global_position - held_item.global_position) #+ hold_offset
held_item.linear_velocity = held_dir * 15 held_item.linear_velocity = held_dir * 50
held_item.look_at(moveable_rotation.global_position, Vector3.UP) held_item.rotation = Vector3(0,held_item_rotation,0) + Vector3(0,camera.global_rotation.y,0)
#break when moved too far away #break when moved too far away
var distance_from_player = abs(self.global_position - held_item.global_position) var distance_from_player = abs(self.global_position - held_item.global_position)
if distance_from_player.length() > 5: if distance_from_player.length() > 5:
@@ -647,7 +647,6 @@ func release_moveable():
held_item.set_collision_layer_value(1,held_item_collision_cache) held_item.set_collision_layer_value(1,held_item_collision_cache)
held_item = null held_item = null
hold_offset = null hold_offset = null
moveable_holder.rotation = Vector3(0,0,0)
## GUNS AND AMMO ## GUNS AND AMMO
func holster_gun(holster): func holster_gun(holster):

View File

@@ -43,7 +43,7 @@ func breaking(bullet_velocity):
#pickup drop #pickup drop
while number_of_drops > 0: while number_of_drops > 0:
var pickup_spawn = level_control.item_pickup.instantiate() var pickup_spawn = level_control.ITEM_PICKUP.instantiate()
var item_stats = level_control.pickup_spawn(false) var item_stats = level_control.pickup_spawn(false)
##SET VARIABLES ##SET VARIABLES

View File

@@ -204,7 +204,7 @@ func drop_loot(number_of_drops):
#pickup drop #pickup drop
while number_of_drops > 0: while number_of_drops > 0:
var pickup_spawn = level_control.item_pickup.instantiate() var pickup_spawn = level_control.ITEM_PICKUP.instantiate()
var item_stats = level_control.pickup_spawn(false) var item_stats = level_control.pickup_spawn(false)
##SET VARIABLES ##SET VARIABLES

View File

@@ -39,24 +39,23 @@ func interact():
func vend(): func vend():
var item_vend var item_vend
if is_pickup: if is_pickup:
item_vend = level_control.item_pickup.instantiate() item_vend = level_control.ITEM_PICKUP.instantiate()
var item_stats var item_stats
item_stats = level_control.pickup_spawn(is_random) item_stats = level_control.pickup_spawn(is_random)
##SET VARIABLES ##SET VARIABLES
item_vend.pickup_type = pickup_type item_vend.pickup_type = pickup_type
if level_control.player.gun != null: if level_control.player.gun != null:
if level_control.player.gun.ammo_type != 5: if level_control.player.gun.weapon_info.bullet.ammo_type != 5:
item_vend.ammo_type = level_control.player.gun.ammo_type item_vend.ammo_type = level_control.player.gun.weapon_info.bullet.ammo_type
else: else:
item_vend.ammo_type = item_stats["ammo_type"] item_vend.ammo_type = item_stats["ammo_type"]
if pickup_type == 0: if pickup_type == 0:
if level_control.player.gun != null: if level_control.player.gun != null:
item_vend.value = level_control.player.gun.max_ammo item_vend.value = level_control.player.gun.weapon_info.max_ammo
else: else:
item_vend.value = item_stats["value"] item_vend.value = item_stats["value"]
else: else:
item_vend.value = pickup_amount item_vend.value = pickup_amount
print("ITEM : ",item_vend.pickup_type,item_vend.ammo_type,item_vend.value)
else: else:
item_vend = item.instantiate() item_vend = item.instantiate()
item_vend.position = vend_ray.global_position item_vend.position = vend_ray.global_position

View File

@@ -8,6 +8,7 @@ class_name weapon_resource
@export_enum("Mag","Revolver","Bolt Action") var reload_type = 0 @export_enum("Mag","Revolver","Bolt Action") var reload_type = 0
@export var bullet : bullet_resource @export var bullet : bullet_resource
@export_enum("Auto", "Single", "Burst") var fire_mode: int @export_enum("Auto", "Single", "Burst") var fire_mode: int
@export var hitscan_range : float = 100 ##for hitscan and melee weapons
@export var fov_zoom_amt = .98 @export var fov_zoom_amt = .98
@export var ads : bool = false @export var ads : bool = false
@export var recoil_amount : Vector3 = Vector3(.05,.05,.05) @export var recoil_amount : Vector3 = Vector3(.05,.05,.05)

View File

@@ -160,7 +160,6 @@ func spawn_casing():
instance_casing.player_velocity = player.velocity * transform.basis instance_casing.player_velocity = player.velocity * transform.basis
get_tree().get_root().add_child(instance_casing) get_tree().get_root().add_child(instance_casing)
func spawn_revolver_casings(): func spawn_revolver_casings():
if casing_array.size() > 0: if casing_array.size() > 0:
var ammo_needed = weapon_info.max_ammo - GameGlobals.gun_ammo[weapon_info.gun_name] var ammo_needed = weapon_info.max_ammo - GameGlobals.gun_ammo[weapon_info.gun_name]
@@ -271,6 +270,10 @@ func bullet_fire():
if weapon_info.fire_mode != 0: if weapon_info.fire_mode != 0:
cycle_count -= 1 cycle_count -= 1
func hitscan_fire():
# Fire hitscan
pass
func swapped_out(): func swapped_out():
queue_free() queue_free()