Contents
I. Some things to know about
1. Uses of AI Triggers
2. Difference of Triggered and AI Editor Scripts
II. The Hero Triggers
1. Creating the Hero
2. Learning and Using of Abilities
3. Attacking, Chasing and Retreating
4. Item System
I. Some Things to Know About
1. Uses of AI Triggering
AI triggering is for advanced Artificial Intelligence to those maps which the AI Editor cannot be applied.
Common genres that uses Triggered AI are AoS, Hero Arena, Hero Defense, RPG (Role Playing Game), etc.
Other things that aren't included (Tags, TDs (Tower Defense), TWs (TowerWars), Maul, CD's (Castle Defense) but aren't purposed for Triggered AI is because that these kind of games is too long and these kind of genres cannot be practiced even with AI Players.
2. Difference of Triggered and AI Editor Scripts
Triggered AI shows more advanced mechanics on the Heroes and its the map makers choice on what he wants to do with the Artificial Intelligence.
As of AI Scripts, it's mechanics is equal to every unit than just caring for the Hero.
AI Scripts are most used in Melee and Campaign maps.
II. The Hero Triggers
1. Creating the Hero
First, we have to create the Hero for the AI, depending on the style of how to get the hero.
Some styles are using a building to upgrade it to a hero, taverns and arenas.
The following codes are at the bottom and you can see if it is for its style (this trigger also gives random heroes of choice).
You can add some stuff like the ff. in the actions:

Actions

[i]Building Upgrade to Hero[/i]

[i]Hero Tavern[/i]

[i]Hero Arena[/i]
Setting the Variable to the Arena.. Add these Actions

Actions
2. Learning and Using of Abilities
Now, what we need is a trigger that makes the Hero Artificial Intelligence to Learn Abilities and know when to use some abilities, especially the triggered ones.
The order of learning of abilities is the best ability (Most Ultimate) to the Least Best (Attribute Bonus or the weakest ability). Even though the Ultimate has a level requirement, it means the AI will try to Learn the Ultimate first than the others, meaning, at level 6 or something, instead of learning the other abilities, the Hero will learn the Ultimate.

[i]Learn Abilities[/i]
You can also make the Hero randomly learn abilities with the If/Then/Else Actions.
Also remember that this can choose 2 random heroes so you better put all of their abilities in.
*=Optional

[i]Usage of Abilities[/i]
I'm not quite sure about Custom Script, because the Variable is still going to be used again, so better use the other setting of the variable.
3. Attacking, Chasing and Retreating
Lastly, we need the AI Hero to farm, have intelligence to chase heroes and also intelligence when to retreat.
There are many kinds of attacking depending on genres, there is lanes, arenas, defense.
(Feature on defending base on AoS and Hero Defense Genre AI will be added soon).

[i]Attacking - Lanes Part One[/i]
We have to create a Integer Variable Lane Randomizer because using the "Chance" style will sometimes not work.
You can find out whats the use of the Turn On triggers after reading Attacking.

[i]Attacking - Lanes Part Two[/i]
An example of AoS Lane Attacking, this trigger has 3 lanes. Mid Of Lane is not a variable, it is a region.
Put this region in the Middle of each lane.

[i]Attacking - Arena[/i]
This is the most simplest Attacking Trigger for AI in Arena. I'm not sure if there are still many.

[i]Attacking - After Casting Spells - Lanes[1] Part One (Initially On)[/i]
Lane1 = West; Lane2 = Middle; Lane3 = East

[i]Attacking - After Casting Spells - Lanes[3] Part One (Initially On)[/i]
Lane1 = West; Lane2 = Middle; Lane3 = East

[i]Attacking - After Casting Spells - Lanes Part Two (Initially On)[/i]

[i]Charging - Lock Target[/i]

[i]Charging - After Locking - Arena[/i]

[i]Charging - After Locking - Lanes[1] Part One (Initially On)[/i]
Lane1 = West; Lane2 = Middle; Lane3 = East;

[i]Charging - After Locking - Lanes[3] Part One (Initially On)[/i]
Lane1 = West; Lane2 = Middle; Lane3 = East;

[i]Charging - After Locking - Lanes Part Two (Initially On)[/i]

[i]Retreat[/i]
4. Item System
The only thing we need now is to make the Hero AI buy items.

[i]Going Near Shops[/i]
The Item Spot Region must be near a shop but is not in the Base Region. Remember that the AI will attack if he enters the Base Region.

[i]Buying Items[/i]
You can also use random integers to make the hero choose from random items.

[i]Selling Items (Initially On)[/i]


Actions
Add these actions to more Advanced items to replace older items for money
Thank you for reading this tutorial..