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

How to make Computer use custom hero?

Status
Not open for further replies.
Level 27
Joined
Nov 5, 2010
Messages
1,404
Hi, I'm making a fourth map for my campaign and in it, I made a custom hero for undead. And I know computer won't use that hero, but how do I make it so that he uses it? Do I need to make an AI or just use some triggers?
Thanks
 
Level 9
Joined
Oct 11, 2009
Messages
477
Yes you need triggering for it or an AI editing will do but consumes more memory for your map. For the triggering, set that hero as a Unit-Type into a specific indexed(if many) Unit-Type variable. After that, order that player to train that type of unit. Use movement triggers for the custom hero using the variable set previously as far as I know that default AI's don't control custom hero(es).
 
Level 27
Joined
Nov 5, 2010
Messages
1,404
Yes you need triggering for it or an AI editing will do but consumes more memory for your map. For the triggering, set that hero as a Unit-Type into a specific indexed(if many) Unit-Type variable. After that, order that player to train that type of unit. Use movement triggers for the custom hero using the variable set previously as far as I know that default AI's don't control custom hero(es).

I'm kind of new to world editor so I don't really understand what triggers to use. Can you show me?
 
Level 3
Joined
Oct 5, 2010
Messages
26
if u want the AI to simply use the spells of the hero and attack your units with it, then just use the AI editor to modify the skill build of the hero which the AI uses, and the AI is smart enough on it's own to use it to attack you. However, if you need the hero to function like in an RPG (i.e. DotA) with advanced micromanaging like running, ganking and so forth, then you need triggers and stuff which can be quite complicated whether you use JASS or not


go read some trigger tutorials, and basically for an AI trigger it is like this:

for a simple escape mechanism
Event: unit is attacked
Action: Order "triggering unit" to "move to (fountain of healing)"

or to make it flee only when it is low health
event: unit health falls below 200
action: Order "triggering unit" to "move to (fountain of healing)"


And so on
 
Level 9
Joined
Oct 11, 2009
Messages
477
Open some unprotected maps through the world editor which has conventional AI's and review its triggers or analyze my method. But I'm sorry I can't create triggers/a test map for you because my Warcraft III on my PC got recently removed.
 
Status
Not open for further replies.
Top