Closest player to an enemie

how do i make a sprite attack or follow the closest player, it’s for a 4 players game.

1 Like
Here's what I did in an unfinished project to calculate the distance between sprites and to determine which one is the closest enemy to the player.


This is the old project if you want to tinker with the functions.

Hope this helps! :grinning:

2 Likes

image
Sprite Utils extension is VERY useful

3 Likes

thank you!

1 Like

Woah :astonished: those DO seem super useful! Thanks for sharing :grinning:

2 Likes

THAAAAAANKS, i really needed this extension.

1 Like