• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

" ignore injured " in an AOS

Status
Not open for further replies.
Level 5
Joined
Jun 16, 2008
Messages
80
Hello,
I have a little problem with the AOS map I am working at.
I want the creeps and towers to ignore injured units, so that they don't change the unit they are attacking and don't focus on low hp units.

Is it possible to use an AI therefor?
I tried it but it didn't work.
If it is possible to solve the problem this way, please tell me how!
If there is another way (with triggers) please tell me about it.
I tried it with trigger, too - but the creeps were bugged sometimes, they just did not attack at all.

Please help me! :)
 
Level 31
Joined
Jul 10, 2007
Messages
6,306
When your tower/creep attacks a target, order it to attack that target (meaning it will won't change target until target goes out of range).

EVENT_PLAYER_UNIT_ATTACKED

For creeps, when target leaves range of attacker, order it to attack a different unit (so it doesn't chase it up the lane).

For leaving range, I'd just do a unit in range event. If the unit is being attacked and unit in range event fires, that means that attacker is chasing.


I should make an any unit in range script some time soon : |.
 
Level 5
Joined
Jun 16, 2008
Messages
80
Thank you very much!!!
You solved my problem!

I gave you rep.

EDIT:

It kinda works, but if it is possible to use an AI in an aos map please someone tell me how, if its not please just tell me.
I just want that creeps ignore injured units.
 
Last edited:
Status
Not open for further replies.
Top