GodotVR/game/zones/outside/extinguishers.gd
Guillaume Vern 80a4c128cc rumble
2025-10-09 16:03:18 +02:00

18 lines
459 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(10):
var copy = original.duplicate()
copy.name = "extinguisher_model_%d" % i
copy.position = original.position + Vector3(0, 0, i * 0.5)
add_child(copy)