I'm currently working on a rpg, and I was wondering how to make it so that when creeps lose interest in you and run back to thier spawn point, they turn invurnable and get fully healed, then turn vurnable again when they reach thier destination?
They chase you to their guard distance.
You could make a trigger to find out when they go to the edge of their guard distance, the place they go back, and heal/invulnerable-ise them?
I'd like to refrain from creating multiple regions for every creep.. I already have a point saved for every creep location through my respawn system. I just don't know how to make it return after getting too far away :<
Since you have a point save for every creep, it would be easier to do this. Create a trigger with a periodic timer, every 1-2 seconds, not too fast. Use a loop to loop through all the creeps on your map. Check that the distance between position of the picked unit (in a unit group containing all the creeps), and its corresponding position in your point array is less than the desired range (maybe 1000-1500?), if not, order the creep to move back to its original position in the point array. And do your invulnerable stuffs.
Ghan has said he has fixed this. Monovertex please confirm this fix. This was only a problem with people that had signatures in the upper levels like not the special members but the respected members.