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!
So basically I'm working on a hero arena map. I made the AI entirely via triggers instead of the AI editor. Only problem I'm having is that I have no clue about the best way to make a hero use a spell whenever an enemy gets close. Could someone help me with this?
This will at least help you base some your spells off of ones the AI will cast without any triggering - though I'm not sure if this will still work if your AI is based in triggers. I think it should work though because according to that post there is underlying code running in the background that dictates the casting.
Alternatively you can use the "Unit - Unit Within Range" Event, but this would require you to set the unit you want to cast the ability within a variable.
This will at least help you base some your spells off of ones the AI will cast without any triggering - though I'm not sure if this will still work if your AI is based in triggers. I think it should work though because according to that post there is underlying code running in the background that dictates the casting.
Alternatively you can use the "Unit - Unit Within Range" Event, but this would require you to set the unit you want to cast the ability within a variable.
In all honesty this is what I would prefer to use, but therein lies another problem I have.
How do I automatically make AI heroes learn skills as they level up?
You periodically run a "tactical AI" function on the unit. This is basically a function which looks for the conditions to cast abilities (eg enemy units nearby). If the AI is not in combat you can lower the poll rate to every 10-15 seconds. In combat a good rate would be every second. Obviously if the unit is dead you do not run at all.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.