Godot Version
4.5
Question
I’m trying to make a HUD that displays health however I can’t get the HUD script to read the health property of the swordsman. A solution with the explanation would be appreciated.
Scene Tree
4.5
I’m trying to make a HUD that displays health however I can’t get the HUD script to read the health property of the swordsman. A solution with the explanation would be appreciated.
Scene Tree
Have you read the node path reference I posted in your previous question? The node path syntax is described there and illustrated with examples. There’s a direct example of how to get a sibling node.
The path from HUD to Swordsmanis $"../Swordsman"
That makes a lot more sense now, thank you! I’ve tried reading the documentation, but I’ve just been so exhausted lately ![]()