How to update label from _on_mouse_entered of another scene

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By dancaer69

I’m new in godot, I followed some tutorials and I’m trying to create a word game.
I have a BaseLetter scene from which I made 8 inherited Letter scenes.
The hierarchy is :

In LetterBoard scene are the instances of inherited Letter scenes:

On the BaseLetter scene I have attached a script and connect the _on_mouse_entered() method. There now I want to get the text of the letter and update the label which is in WordScene.
Among other things I tried this:


But I get error about null instance.
So, how can I do this?

:bust_in_silhouette: Reply From: exuin

Generally, you want to signal up and call down. But if you don’t want to use a signal here, you should use a different path. ".." gets the LetterBoard scene. You need to go up another level. So the path should be $"../../WordScene/Label".

This works, fine. Thanks.

dancaer69 | 2021-02-26 15:29