• 🏆 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!

Computer Controlled units casting spells.

Status
Not open for further replies.
Level 9
Joined
Dec 9, 2012
Messages
288
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 28
Joined
Feb 18, 2014
Messages
3,579
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
288
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?
 
Status
Not open for further replies.
Top