#getting the name or filepath of a node

1 messages · Page 1 of 1 (latest)

green herald
#

I can't find a solution for this anywhere, so I'm assuming that I'm using the wrong keywords. I want to get either the name(BitBot) or filepath(res://BitBot.tscn) and return it as a string. I've tried get node but it returns the Type(KinematicBody2d) which doesn't work for what I'm trying to do.
some pseudocode to demonstrate what I'm trying to acomplish:
func _on_hitbox_entered(body):
x=str(body.get_name())
print(x)

unborn delta