Computer Controlled units casting spells.

Level 9
Joined
Dec 9, 2012
Messages
290
Hello there, hivers, It's been a long time since last I posted a question around here, and here I'm back to mapping again and of course many fundamentals were forgotten, so my question for now is as the title suggests, How to make computer controlled units cast spells?
 
Level 27
Joined
Feb 18, 2014
Messages
3,543
Is it for a melee map? Also are they custom spells? The AI should cast custom spells if they are based on appropriate spells. See this tutorial for reference : Base abilities for custom spells cast by melee-game AI units
If it's for a non-melee map, example a Boss Fight, RPG style, etc..., you can alternatively order the computer unit to cast the spell using this command for example :
  • Unit - Order (Unit X) to Mountain King - Storm bolt (Unit Y)
 
Level 9
Joined
Dec 9, 2012
Messages
290
Is it for a melee map? Also are they custom spells? The AI should cast custom spells if they are based on appropriate spells. See this tutorial for reference : Base abilities for custom spells cast by melee-game AI units
If it's for a non-melee map, example a Boss Fight, RPG style, etc..., you can alternatively order the computer unit to cast the spell using this command for example :
  • Unit - Order (Unit X) to Mountain King - Storm bolt (Unit Y)

Well, it's scenario-like type of a map with boss fights, the strange thing is that I had an old map where computer controlled units managed to cast spells freely without intervening, I tried to see what I did there (triggers, unit data) but I found nothing, anyways, what about AOE and channeling spells?
 
Top