• 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.

Question about AI heroes

Level 4
Joined
Sep 29, 2010
Messages
29
I've been working on a tug of war map and i have it 80% done mainly thank to the help of the hive community but i have a question about ai heroes using skills and abilities, i've noticed they just wont use some of the standard abilities like holy light or resurrection, is there an easy fix for this? or do i need to do something like make a copy of the ability on the back of an ability i know they will use like for instance i replaced the force of nature from malfurion to a new ability that is just spit wolves but it summons treants as there would be trees and he uses that. so maybe i should use the standard heal ability make a copy of that and make it act like holy light?
 
Level 30
Joined
Aug 29, 2012
Messages
1,382
AI shouldn't have any problem using Holy Light, but it can't be cast if units are classified as undead or mechanical, for instance, and Resurrection needs that the dead units have this field set up

1733005122129.png
 
Level 4
Joined
Sep 29, 2010
Messages
29
AI shouldn't have any problem using Holy Light, but it can't be cast if units are classified as undead or mechanical, for instance, and Resurrection needs that the dead units have this field set up

View attachment 499712
yeah i dont get it ether is it because im using uther? he uses the divene shield when he gets attacked but he never heals his human footmen or resurrects them i also made a custom ability of Spawn hawk to spawn a hawk with a skin of a scout owl for tyrande but i never saw her use it ether. could it also be that i have a scirpt for when a unit order becomes "empty string"
1733005625932.png
the only reason i have this is other wise they just stand there some times

i cant think of any other reason why they wouldnt be using these skills
 
Level 30
Joined
Aug 29, 2012
Messages
1,382
Nah the unit you're using doesn't matter, the behavior depends on the spell that was used as a base and those should be perfectly fine. Does he has enough mana / levels to use the spells?

I don't think they would ever use the scout spell though, base it on e.g. summon water elemental
 
Level 4
Joined
Sep 29, 2010
Messages
29
Nah the unit you're using doesn't matter, the behavior depends on the spell that was used as a base and those should be perfectly fine. Does he has enough mana / levels to use the spells?

I don't think they would ever use the scout spell though, base it on e.g. summon water elemental
ok its even more werid as a death knight will use death coil on allies and enemies
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
Here is the Holy Light cast behavior description from the Wc3 Ability Insight Document (extremely helpful resource btw):
Casting by AI: Spam on any nearby Undead units or friendly non-Undead units, prefers heroes. /Death Coil is same function as Holy Light but with opposite targets. It's been noticed while doing some Tank/Spank boss fights that if the hero is taken a LOT more damage then the heal, the healer or himself(if he has this spell) he STOPS casting it
That could be incomplete information that nobody has expanded upon or clarified. Perhaps you are in that final situation? You may also find information in this thread, though I swear there is a more comprehensive and better-formatted version here somewhere: Base abilities for custom spells cast by melee-game AI units
 
Level 4
Joined
Sep 29, 2010
Messages
29
Here is the Holy Light cast behavior description from the Wc3 Ability Insight Document (extremely helpful resource btw):

That could be incomplete information that nobody has expanded upon or clarified. Perhaps you are in that final situation? You may also find information in this thread, though I swear there is a more comprehensive and better-formatted version here somewhere: Base abilities for custom spells cast by melee-game AI units
Could I get around it by having a range checker to check if their is a non undead aliy near a hero with holy light off cooldown and if has enough mana cast it on that target and something similar with Resurrection with Ally Corpses. If possible, I would need to figure out how to do that.
 
Top