WIP: Start working on the frag/damage system

This commit is contained in:
2025-02-02 17:56:39 +01:00
parent 0cb2089191
commit dbc6a79182
25 changed files with 3295 additions and 211 deletions

View File

@ -0,0 +1,17 @@
extends CharacterBody3D
var health = 100
var alive = true
func take_damage(damage: int):
print("I")
func _physics_process(delta: float) -> void:
if health == 0:
alive = false
var world: Node3D = find_parent("Map")
var spawner: MultiplayerSpawner = world.find_child("ObjectSpawner").find_child("MultiplayerSpawner")
var objects_root: Node3D = world.find_child("ObjectSpawner").find_child("Objects")
#reparent(get_tree().get_root())
$Dummy.die()
#queue_free()

View File

@ -0,0 +1,16 @@
[gd_scene load_steps=4 format=3 uid="uid://b7vj5j6wxqrfr"]
[ext_resource type="Script" path="res://scenes/characters/npc/zombie/zombie.gd" id="1_2j0kt"]
[ext_resource type="PackedScene" uid="uid://1txob6jskn5s" path="res://scenes/characters/blue/dummy.tscn" id="1_qd8fb"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_t4cyd"]
height = 1.6
[node name="PlayerPlaceholder_Zombie" type="CharacterBody3D"]
script = ExtResource("1_2j0kt")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.801503, -0.185051)
shape = SubResource("CapsuleShape3D_t4cyd")
[node name="Dummy" parent="." instance=ExtResource("1_qd8fb")]