• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Unit AI issue

Status
Not open for further replies.
Level 3
Joined
May 7, 2005
Messages
36
I've encountered a problem with the units in my map, since ive emplored a small hp and attack dmg pool on all units including heroes, if a hero attacks a unit in a swarm of units the hero gets attacked automatically untill fleeing. No matter what... Is there anyway to fix this or is it just in the base ai of units that it attacks a low hped hero even if the hero is 100% hp but has less then 100 hp total?
 
Level 6
Joined
Sep 13, 2008
Messages
261
Each unit has a priority number. Try lowering it in the object editor. If this doesn't fix the problem then you would probably have to make/import a custom ai script.
 
Level 6
Joined
Sep 5, 2007
Messages
264
I'm fairly sure that the priority of units is multiplied by thier current hp.

So a unit with 10 priority and 100 hp (1000) would by more likely to be attacked than a unit with 1 priority and 500 hp. I think that's how it works. I also pretty certain that the AI gives extra priority to enemy heroes. Try setting your units priority to -1 (shift double-click "priority" in the object editor, this allows ANY value, including negatives).

Hope that this has been inciteful. :thumbs_up:
 
Status
Not open for further replies.
Top