So I have been coding a platformer for a project, and need to code an enemy.
I want to make the enemy attack when the player's position is in a certain range relative to the enemy's position.
Aside from this being sloppy AI that I'll fix later, I can't seem to find a way to access the position of the KinematicBody2D node I use for the player.
I've tried making a variable in the World node, and it won't access that.
Any suggestions would be appreciated