bomb spawn im crying
This commit is contained in:
parent
9d0e09220d
commit
3302fcfc96
16 changed files with 148 additions and 15 deletions
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=24 format=3 uid="uid://dpsr6ug3pkb40"]
|
||||
[gd_scene load_steps=25 format=3 uid="uid://dpsr6ug3pkb40"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://3dphlay25fih" path="res://scripts/player/player.gd" id="1_g2els"]
|
||||
[ext_resource type="Script" uid="uid://dalwlndejfdhm" path="res://scripts/player/crosshair.gd" id="3_dqkch"]
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
[ext_resource type="Script" uid="uid://u0e2b2mvij1k" path="res://scripts/player/states/standing.gd" id="10_a8ls1"]
|
||||
[ext_resource type="Script" uid="uid://cwasvwhm5yg0o" path="res://scripts/player/states/walk.gd" id="11_qfm1y"]
|
||||
[ext_resource type="Script" uid="uid://cq4i0afwesdm3" path="res://scripts/player/states/falling.gd" id="12_fulsm"]
|
||||
[ext_resource type="PackedScene" uid="uid://bxdatd1ilfgmc" path="res://scenes/weapons/bomb.tscn" id="17_fjvrb"]
|
||||
[ext_resource type="Script" uid="uid://xsgfbuyje35p" path="res://scripts/player/player_pickup.gd" id="17_fjvrb"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_u8vuu"]
|
||||
resource_local_to_scene = true
|
||||
|
|
@ -125,6 +125,10 @@ _data = {
|
|||
&"crouch": SubResource("Animation_oprun")
|
||||
}
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_3xmak"]
|
||||
radius = 0.82177734
|
||||
height = 3.7087402
|
||||
|
||||
[node name="Player" type="CharacterBody3D" node_paths=PackedStringArray("weapon_models")]
|
||||
collision_layer = 2
|
||||
collision_mask = 3
|
||||
|
|
@ -252,10 +256,9 @@ script = ExtResource("12_fulsm")
|
|||
player = NodePath("../..")
|
||||
SPEED = 5.0
|
||||
|
||||
[node name="WeaponSystem" type="Node" parent="." node_paths=PackedStringArray("default_pistol", "default_knife", "animation_player", "camera", "player")]
|
||||
[node name="WeaponSystem" type="Node" parent="." node_paths=PackedStringArray("default_pistol", "animation_player", "camera", "player")]
|
||||
script = ExtResource("4_qlg0r")
|
||||
default_pistol = NodePath("StartingPistol")
|
||||
default_knife = NodePath("Bomb")
|
||||
animation_player = NodePath("../Camera3D/molikman_hands/AnimationPlayer")
|
||||
camera = NodePath("../Camera3D")
|
||||
player = NodePath("..")
|
||||
|
|
@ -265,7 +268,8 @@ player = NodePath("..")
|
|||
[node name="Shoot" parent="WeaponSystem/StartingPistol" index="1" node_paths=PackedStringArray("raycast")]
|
||||
raycast = NodePath("../../../Camera3D/RayCast3D")
|
||||
|
||||
[node name="Bomb" parent="WeaponSystem" instance=ExtResource("17_fjvrb")]
|
||||
[node name="WeaponSpawner" type="MultiplayerSpawner" parent="WeaponSystem"]
|
||||
spawn_path = NodePath("..")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
|
|
@ -278,6 +282,17 @@ player = NodePath("..")
|
|||
layer = true
|
||||
inverse = true
|
||||
|
||||
[node name="PickupRange" type="Area3D" parent="." node_paths=PackedStringArray("weapon_spawner", "weapon_system")]
|
||||
collision_layer = 0
|
||||
collision_mask = 8
|
||||
script = ExtResource("17_fjvrb")
|
||||
weapon_spawner = NodePath("../WeaponSystem/WeaponSpawner")
|
||||
weapon_system = NodePath("../WeaponSystem")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="PickupRange"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.8543701, 0)
|
||||
shape = SubResource("CapsuleShape3D_3xmak")
|
||||
|
||||
[connection signal="spawned" from="." to="Camera3D/RayCast3D/TeamUpdater" method="on_spawned"]
|
||||
[connection signal="spawned" from="." to="TeamUpdater" method="on_spawned"]
|
||||
|
||||
|
|
|
|||
38
scenes/weapons/droppable_bomb.tscn
Normal file
38
scenes/weapons/droppable_bomb.tscn
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://cxdgk74ln5xpn"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cskgqgkr7pmb0" path="res://scripts/weapon_system/dropped_weapon.gd" id="1_hsebh"]
|
||||
[ext_resource type="PackedScene" uid="uid://dftij0fdq3lbr" path="res://models/weapons/Bomb.glb" id="1_pcfvq"]
|
||||
[ext_resource type="PackedScene" uid="uid://bxdatd1ilfgmc" path="res://scenes/weapons/bomb.tscn" id="2_ucc3u"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_hsebh"]
|
||||
size = Vector3(1, 0.25274658, 0.7492676)
|
||||
|
||||
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_ddvbd"]
|
||||
properties/0/path = NodePath(".:position")
|
||||
properties/0/spawn = true
|
||||
properties/0/replication_mode = 1
|
||||
properties/1/path = NodePath(".:rotation")
|
||||
properties/1/spawn = true
|
||||
properties/1/replication_mode = 1
|
||||
|
||||
[node name="DroppableBomb" type="RigidBody3D" node_paths=PackedStringArray("weapon")]
|
||||
collision_layer = 8
|
||||
collision_mask = 9
|
||||
script = ExtResource("1_hsebh")
|
||||
slot = &"bomb"
|
||||
weapon = NodePath("BombWeapon")
|
||||
|
||||
[node name="BombWeapon" parent="." instance=ExtResource("2_ucc3u")]
|
||||
|
||||
[node name="Bomb" parent="." instance=ExtResource("1_pcfvq")]
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -3.0517578e-05, 0.0010986328)
|
||||
shape = SubResource("BoxShape3D_hsebh")
|
||||
|
||||
[node name="MultiplayerSynchronizer" type="MultiplayerSynchronizer" parent="."]
|
||||
replication_config = SubResource("SceneReplicationConfig_ddvbd")
|
||||
|
||||
[node name="MultiplayerSpawner" type="MultiplayerSpawner" parent="."]
|
||||
_spawnable_scenes = PackedStringArray("uid://bxdatd1ilfgmc")
|
||||
spawn_path = NodePath("..")
|
||||
Loading…
Add table
Add a link
Reference in a new issue