Hi.

I'm trying to access a uniquely named node but am having trouble doing so. Here is a screenshot of my scene tree:

The node in question is 'AllDestructibles'. So this scene is composed of other scenes and the script that is trying to access AllDestructibles is attached to a node inside the 'Lander' scene where I'm doing this:
var all_destructibles = %AllDestructibles. However that just ends up being null.

If I create a unique 'AllDestructibles' node attached to the Lander scene, then it works. Why can I not access this unique node from a script inside another scene? Is that just not possible?

I am able to get this to work if, instead, I do something like get_tree().get_root().find_child("AllDestructibles", true, false). So I'm mostly asking this just to understand things better.

Thanks!

    JensD another option is to grab the node from the parent using an empty variable as a "shell." I don't know what logic you are looking for, but if you are always keeping that node the same unique name, you can access the name of it from the parent using another. Then that variable "holds" the object reference until it leaves the scene or you empty out the variable reference.

    var _targetNode = null ## container
    
    
    func _ready():
        var _myDestructibles = get_parent().get_node("AllDestructibles")
        if_myDestructibles != null:
            _targetNode = _myDestructibles
            _targetNode.your_function_or_logic_here()

    Though to note: you could also pop all those Destructibles in a group and just run logic on each one piece by piece in a for loop.

    Thanks for the pointer to the docs - I totally missed that.

    @SnapCracklins That's also useful - thanks!