GodotVR/game/zones/outside/extinguishers.gd
Guillaume Vern a2385360db 18.5
2025-10-10 15:46:35 +02:00

18 lines
458 B
GDScript

extends Node3D
func _ready() -> void:
# Avoid duplicating again if already created
if has_node("extinguisher_model_0"):
return
var original = find_child("extinguisher_model", true, false)
if not original:
push_warning("No node named 'extinguisher_model' found.")
return
for i in range(3):
var copy = original.duplicate()
copy.name = "extinguisher_model_%d" % i
copy.position = original.position + Vector3(0, 0, i * 0.5)
add_child(copy)