Godot Version
4.6.2
Question
Hi everyone!
I have this behavior with NodePath that I would like to understand. I have this TacticsPlanner scene that has several child actions:
Each action has a @export var action_connections: Array[Dictionary]and each entry has a Dictionarycontaining an emitter, receiver, and signal name. I’m using this data to connect signals through code.
The emitter and receiver are NodePath. When I run the TacticsPlanner code and place a for loop to connect these signals, the path seems to get the wrong node.
So, in this example, the print returns the TacticsPlanner, instead of the ComboAttackAction.
CONNECTION
TacticsPlanner:<Node#296134641754>
At: res://characters/enemy/dummy/tactics/dummy_tactics_planner.gd:15:initialize()
If I remove get_node() to check what the path being returned is, I have this:
CONNECTION
.
At: res://characters/enemy/dummy/tactics/dummy_tactics_planner.gd:15:initialize()
I was expecting the code would return the ComboAttackAction(or any other node selected). So, why is this happening?


