*** I'm new to the Forum and, as I already mentioned (in the wrong post), I wanted to thank the community who ask questions, answer and post capx for example. Sincerely, Thank you, I would have never achieved what I succeeded doing until now and I hope to get your knowledge in the near future to help others as well.***
I still need your help
Here is my problem:
I would like to create multiple enemies (same sprite and behavior) who have their own position on the map. When the Player gets into their range, only the enemy who detects the Player needs to chase him. If the Player manages to run outside of the detection range, the enemy returns to his initial position.
I can' post the link yet because I do not have enough rep :(
But if you really need the capx, change the "*" by "/" and "@" by "."
Sorry guys, it's a bit odd :(
The capx here:
- The capx allows you to see how the Player moves toward Mouse clic with Pathfinding
- How an enemy detects the Player and chases him with Pathfinding
- On Attack Range, how the enemy triggers his attack animation
- If the Player manages to escape, enemies return to their position (I got lucky for this one.)
In addition, I would like to prevent enemies from overlapping each other when they attack the Player. Do you have any idea, suggestion for the approach to take? I'm thinking about changing my capx with the Turret/Line of Sight behavior and checking distance for the detection part. In addition, I think to add an array to check if enemies are not overlapping and if they do, move to another the closest free "array cell" from the Player. What do you think about this approach? Is there an easier way to get this?