Not attacking the same target twice is the hard part. It's actually not tricky if you want it to be a hard restriction; just make the attack add an invisible debuff and then add a validator to the attack effect that restricts it from hitting anything with that debuff. What's tricky is making it a soft restriction - so it prioritizes units it hasn't yet attacked, but will still attack them if no other targets are available. I haven't yet found an adequate data editor-only solution to this particular problem, though it isn't too hard to solve with triggers.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
See topic: What is the best way to make a unit attack a random unit within its range and change the target after each attack?
Any ideas?
@madmaxII: Go
Give it a weapon and it'll automatically do that.
Not attacking the same target twice is the hard part. It's actually not tricky if you want it to be a hard restriction; just make the attack add an invisible debuff and then add a validator to the attack effect that restricts it from hitting anything with that debuff. What's tricky is making it a soft restriction - so it prioritizes units it hasn't yet attacked, but will still attack them if no other targets are available. I haven't yet found an adequate data editor-only solution to this particular problem, though it isn't too hard to solve with triggers.