Help with cursor in godot2D

Godot Version



hi i am new to making 2D rpg game and i want to character hit enemies when clicking left but cursor is the point where the attack zone should appear and i want so the cursor wont appear attack zone if clicked out of range. I dont know how to make collision shape follow cursor mouse and how to stop it if it is out of zone so i need little help. thank you for all suggestions and if you need some code from me that i use i will provide it. thank you for help

Not to be rude at all, but sincerely - it’s hard (for me at least) to make sense of the question the way this is phrased currently.

Would you mind trying to re-phrase in some more detailed / simpler language?

If you have an image that helps to explain, that would be great as well.

You can use the Vector2 method distance_to() to get the distance from one point to another like first_point.distance_to(second_point).

It sounds like the attack-zones should be attached to your enemy and then they can control whether the “cursor” shows or not.