Warcraft III resources & community, 2003–2006 · archived

computer hero using spells

10 posts
#1

computer hero using spells

As said in the topic, how do i get a computer players hero to use his spells? If i give the hero an order to attack-move to somewhere where there is enemy units, how do i get the hero (controlled by computer) to learn and use his spells against the enemy units?

Sounds simple, and i though it would be, but i find myself hitting brick wall. Anyone can help me?
#2
I dont think he can learn spells,but I do think he can do spells randomley in battle. >_> This might just be me though,but whatever. :roll:
#3
I am not pro at those things, but i'm sure you will have to give it a custom AI (Artifical Intelligent for Warcraft).
If you are not talking about custom spells that you make yourself, you also have to give it a different AI. If you change the skills of a tauren chieftan (for example) the AI still orders them to learn the original tauren chieftan's skills (as far as I know).

-Rui
#4
Event
A unit starts attacking a unit
Action
Order Attacking Unit to [use spell] (on attacked unit)

I think that's the basic idea for auto-casting units, check Darkys map "Natures Call - Circle Defense", there're some trigger functions that could be useful (at least I remember them to be there).

For the learning, there should be an action that makes the hero learn an ability (or set the level of an ability). For the event, there's sth like "Hero - A hero gains a level".

Of course you can do that by editing the AI-file, but that's difficult as hell.
#5
On the event that DarkShadow sed:
Hero-A hero gains a level
To learn a skill from other heroes:
Hero-Learn skill from triggering unit:HumanArchmage- Blizzard
Its an example
#6
Well i though it had something to with the AI. I browsed through the AI section in here wc3search but i didnt really understand anything since they didnt have descriptions. Anyone more familiar to AI's knows if there is AI in the AI section right here on wc3search? And i just want a normal hero using his spells what blizzard gave him, nothing custom, and more spesificly Undead Heroes. I cant believe making the hero use his spells with a trigger is the only way...it cant be?? So AI help needed :)
#7
Check AI Editor. I can't open up my editor right now, for some weird reason. But explore up the AI Editor and i'm sure you will understand.

-Rui
#8
The AI-files in the AI-section were made using the AI-editor in WE. Imo they're completely useless.
#9
Agreed, that things are not very useful. We are needing some more good AI makers :D

-Rui
#10
But i suggest making this with triggers , not creating an AI...