added projectile class and tweaked weapon uberscript

This commit is contained in:
derek
2025-03-04 12:01:14 -06:00
parent 8fbd79eac3
commit cc1500e7fd
16 changed files with 922 additions and 166 deletions

View File

@@ -1,10 +1,11 @@
[gd_scene load_steps=46 format=4 uid="uid://2o2wcc5i1al4"]
[gd_scene load_steps=48 format=4 uid="uid://2o2wcc5i1al4"]
[ext_resource type="Script" path="res://scripts/rocket_launcher.gd" id="1_ra4f1"]
[ext_resource type="Script" path="res://scripts/weapon_uberscript.gd" id="1_pjiot"]
[ext_resource type="Texture2D" uid="uid://dyvcljaoux8h" path="res://assets/Textures/ObjectTextures/RocketLauncher.png" id="2_41bg8"]
[ext_resource type="PackedScene" uid="uid://hptaoyu5jeqk" path="res://assets/rocket.tscn" id="2_dmokb"]
[ext_resource type="Resource" uid="uid://dyhmds5hl1r6f" path="res://assets/weaponresources/rocket.tres" id="2_mnla0"]
[ext_resource type="Shader" path="res://assets/viewmodel_shader.gdshader" id="4_2ulpw"]
[ext_resource type="Texture2D" uid="uid://d2t7w8xq8n4r5" path="res://assets/Models/SubstancePainterTest/rocketlauncher12_BaseColor.png" id="4_7wsrp"]
[ext_resource type="Script" path="res://scripts/weapon_resource.gd" id="4_f4tsf"]
[ext_resource type="AudioStream" uid="uid://dp71xac3vbsob" path="res://assets/Audio/Weapons/rocket-launcher-firing-SBA-300109793.wav" id="5_i3755"]
[ext_resource type="Texture2D" uid="uid://bp3us6s0mxgym" path="res://assets/Models/SubstancePainterTest/rocketlauncher12_Metallic.png" id="5_ogrpo"]
[ext_resource type="Texture2D" uid="uid://cx364xcrtam3g" path="res://assets/Models/SubstancePainterTest/rocketlauncher12_Normal.png" id="6_g20a5"]
@@ -24,6 +25,28 @@
[ext_resource type="Texture2D" uid="uid://cc1rd3qb8juw5" path="res://assets/Models/SubstancePainterTest/rocketlauncher1.rocket_Normal.png" id="18_lmvdg"]
[ext_resource type="Texture2D" uid="uid://b7fmyem2kw5ra" path="res://assets/Models/SubstancePainterTest/rocketlauncher1.rocket_Roughness.png" id="19_27agv"]
[sub_resource type="Resource" id="Resource_5bic2"]
script = ExtResource("4_f4tsf")
gun_name = "rocket launcher"
gun_icon = ExtResource("2_41bg8")
path = "res://assets/rocket_launcher.tscn"
weapon_type = 0
bullet = ExtResource("2_mnla0")
fire_mode = 1
fov_zoom_amt = 0.98
ads = false
recoil_amount = Vector3(0.05, 0.05, 0.05)
kick_amount = 0.1
max_ammo = 1
start_mags = 3
bullet_damage = 1
smoke_enabled = false
bullet_force_mod = 5.0
bullet_speed = 300
shotgun_spread = Vector3(0.1, 0.1, 0.1)
pellets_per_shot = 20
blast_power = 50.0
[sub_resource type="ShaderMaterial" id="ShaderMaterial_uqdtd"]
resource_name = "rocketlauncher12"
render_priority = 0
@@ -451,6 +474,20 @@ tracks/1/keys = {
"update": 0,
"values": [Vector3(0, -1.5708, -1.5708), Vector3(-2.43315e-07, -1.5708, -1.63806), Vector3(0, -1.5708, -1.5708)]
}
tracks/2/type = "method"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath(".")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0.01),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"bullet_fire"
}]
}
[sub_resource type="Animation" id="Animation_rqg2e"]
resource_name = "swap_in"
@@ -531,24 +568,17 @@ _data = {
"swap_out": SubResource("Animation_nn25p")
}
[node name="RocketLauncher" type="Node3D" node_paths=PackedStringArray("anim_player", "barrel_raycast", "mag_ejector", "audio_fire", "audio_empty", "audio_reload")]
script = ExtResource("1_ra4f1")
gun_name = "Badooka"
gun_icon = ExtResource("2_41bg8")
ammo_type = 4
fire_mode = 1
max_ammo = 1
bullet_speed = 60.0
bullet = ExtResource("2_dmokb")
[node name="RocketLauncher" type="Node3D" node_paths=PackedStringArray("anim_player", "barrel_ray", "audio_fire", "audio_empty", "audio_reload")]
script = ExtResource("1_pjiot")
weapon_info = SubResource("Resource_5bic2")
anim_player = NodePath("AnimationPlayer")
barrel_raycast = NodePath("rocketlauncher1/BarrelRaycast")
mag_ejector = NodePath("rocketlauncher1/BarrelRaycast")
barrel_ray = NodePath("rocketlauncher1/BarrelRaycast")
audio_fire = NodePath("Audio/Fire")
audio_empty = NodePath("Audio/Empty")
audio_reload = NodePath("Audio/Reload")
[node name="rocketlauncher1" type="MeshInstance3D" parent="."]
transform = Transform3D(1.41767e-10, -3.62203e-06, -1, -0.999434, -0.0336273, 1.21657e-07, -0.0336273, 0.999434, -3.61999e-06, 0.172647, 0.263837, 0.342894)
transform = Transform3D(1.31043e-11, -3.61999e-06, -1, -1, -3.61999e-06, 0, -3.61999e-06, 1, -3.61999e-06, 0, 0.242, 0.5)
cast_shadow = 0
lod_bias = 10.0
mesh = SubResource("ArrayMesh_3trqo")