Is it possible to make my code robust in a way that it works in any configuration both when playing my main level.tscn and the dialogue_machine.tscn file itself, and make it always find its children?
Instead of referencing the node directly simply export a reference in your DialogueMachine script and then assign the correct node to that variable through the inspector.
@export var label: Label
Also, I dont’ think you need to duplicate your Label to create a shadow effect, go through the theme ovverrides in the Inspector, there might be an option to achieve the same result you are looking for
@ProgrammerOnCoffee omg that’s exactly what I did Great catch! Thank you omg. I think I must have dragged my .gd script instead of .tscn into the tree.
@colelli I’m using a custom shader to add a special gradient to my font which affects both my fill and shadow alike. To avoid it, I make a copy of my label without the shader to manually recreate the shadow. But generally I fully agree