*** 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:
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?
Develop games in your browser. Powerful, performant & highly capable.
" I would like to prevent enemies from overlapping each other when they attack the Player."
I currently have a similar problem ! I tried to set them as "solid" as well but it doesnt work, they don't "bounce" or avoid each other and they overlap.
Well, did you tried to workaround it by checking distances between each enemy? Or, simple check if an enemy overlapped another enemy and stop the pathfinder behavior?
It should be something like this:
= For Each Enemy ordered by UID (for example)
== Enemy_1 is NOT overlapping EnemiesFamily
---- Your pathfinder events here, including the event responsible for the enemy movement ----;
Stop Enemy (stop the pathfinder course too);
Not yet, it is my next plan indeed :)
but I don't have Construct 2 license yet :( so, I can't work with families but I will get my license soon :)
hi TELLES0808, could u post a simple capx file...( iam beginner) and have exactly that problem