This commit is contained in:
Twirpytherobot
2026-02-17 22:51:38 +00:00
parent 7629342540
commit 7fa2efabaf
7 changed files with 193 additions and 15 deletions
+20
View File
@@ -97,6 +97,16 @@ func _on_enemy_died(killer_id: int):
if _mesh:
_mesh.visible = false
# Disable collision so players can walk through
var collision_shape = get_node_or_null("CollisionShape3D")
if collision_shape:
collision_shape.disabled = true
# Disable hurtbox
var hurtbox = get_node_or_null("HurtBox")
if hurtbox:
hurtbox.monitorable = false
print("[PracticeDummy] Killed by player ", killer_id, ". Respawning in ", respawn_delay, " seconds...")
## Override respawn to show mesh again
@@ -108,5 +118,15 @@ func _on_enemy_respawned():
_mesh.visible = true
_reset_material()
# Re-enable collision
var collision_shape = get_node_or_null("CollisionShape3D")
if collision_shape:
collision_shape.disabled = false
# Re-enable hurtbox
var hurtbox = get_node_or_null("HurtBox")
if hurtbox:
hurtbox.monitorable = true
_update_health_display()
print("[PracticeDummy] Respawned!")