#How to Call a Child Based on Global Position

2 messages · Page 1 of 1 (latest)

dense forge
#

reference

    if event is InputEventKey:
        if event.pressed and event.keycode == KEY_E:
            $"/root/Node2d".break()``` this is in the character
Node2d is the name of node which is instantiated to create tiles
```func _break():
    for child in get_children():
        print(child.global_position)```
everything works until i press "E"
umbral prism