spawning chests in csg boxes, working on making them root of scene so they aren't cleared with the scene on exit
This commit is contained in:
@@ -26,14 +26,10 @@ func _on_body_entered(body: Node3D) -> void:
|
||||
|
||||
entered = true
|
||||
if active and entered:
|
||||
HelperFuncs.clear_spawned_objects()
|
||||
var spawned_stuff = scene_holder.get_children()
|
||||
for i in spawned_stuff:
|
||||
i.queue_free()
|
||||
|
||||
func clear_spawned_objects():
|
||||
for i in get_tree().current_scene:
|
||||
if i.is_in_group("spawned"):
|
||||
i.queue_free()
|
||||
|
||||
func _on_start_activation_timeout() -> void:
|
||||
active = true
|
||||
|
||||
Reference in New Issue
Block a user