I have a tilemap layer that plots an Astar2d path for a character and have the following script in the character. I want just one character to move when I feed in coordinates, but this moves all the characters at once. If I do it from the tilemap with a variable for a selected character, the character just disappears when I send the coordinates. Is there a better way to do this?
Here’s my Code:
if current_path.is_empty():
return
for coord in current_path:
print("moving")
self.global_position = global_position.move_toward(Vector2(coord), 1)