HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

AI for a single hero

04-24-2005, 05:42 PM#1
qwertyui
Can someone give any pointers on how to create AI for a single hero, playing in a DotA style map?
04-24-2005, 09:01 PM#2
Tommi
You have to use triggers for that.
04-25-2005, 08:20 AM#3
PitzerMike
A combination of triggers and an ai script works quite well for that.

You would have certain events in the triggers, which the hero should react to, and when they fire send an ai command to the ai script.
The actual control over the hero would then be in the ai script.

To take it one step further you can then use game cache for better map script/ai script communication or teamplay between several ai heros.
04-25-2005, 08:42 AM#4
Tommi
The problem with the AI approach is that heroes are classified as support units. You must always include other units in the assault group, or you run into serious troubles. Thus, an AI for a single hero should be made only with triggers.
04-25-2005, 03:36 PM#5
qwertyui
I tried searching the forum, but i couldn't find any tutorials neither on Game Cache, nor on in-battle AI scripts. Could you direct me to some?
04-25-2005, 04:06 PM#6
Tommi
I don't think there are any tutorials published for these specific purposes. There are a few articles that talk about interscript communication although they don't mention the use of game cache for this purpose. Have a look at:
http://jass.sourceforge.net/doc/library.shtml#isc
http://users.tkk.fi/~tgustafs/wc3ai.html (especially Section 2.4)
04-25-2005, 10:43 PM#7
Vexorian
In my arena, I have these 4 things:
- A trigger that let's the heroes learn their skills.
- A combination of triggers that allow them to handle the arena with things like teleports.
- A combination of triggers that order the hero to do stuff at periods of time , this one has some stuff inside like team work, duel challenging and item picking.

And the final is an AI script that just enables the Smart Artillery and other options of the AI I can't remember too much, but it only calls them and does nothing more.
04-26-2005, 08:55 AM#8
qwertyui
Can you give me a link to an uprotectred version of your arena, or is it classified information?
04-28-2005, 05:37 PM#9
Vexorian
Copying it from my arena to adapt to your map would be much more difficult than making one yourself
04-29-2005, 06:24 PM#10
curi
yeah but reading your code to understand how to do it would be much easier than figuring it out himself.