- Edited
EDIT: Asked the wrong question, the actual question is how to use get_node on a child that is created via scripting and not in the scene prior. I think it needs to be done in my main scene and in the _ready function but I can't figure out where to go from there.
Hi all! I'm sorry if this has been asked before I've been trying to find an answer for a bit now. I'm very new to Godot and GDScript (It's maybe been a week). I've read over the Godot documentation on signals and I'm not sure if I'm just missing something or what.
I'm working on a logic puzzle game (kind of like the app Logic Riddle except with a fantasy theme). I'm having some issues figuring out how to use signals in a node that is created using scripts.
What I'm trying to do is access the pressed signal on a button after the button has been created. Right now I have a Control node with a child GridContainer and the buttons are created via script and put as children of the GridContainer when the ready function is called. I can't figure out how (or even if its possible) to use the signals in those created children to do something else (what I want to do is display the texture on another node when the button is pressed). If that is possible would it go on the main scene or on the control node?
I'm not sure how much additional information might be needed to help me, so please let me know if I need to provide for information