AI heroes do simple smart spells

Level 2
Jun 10, 2011
the question...
hey friends , im gonna create a melee map with smart AI Heroes,
this is the concept :
AI heroes must be confined with triggers, by doing such:
good patrol in the map then be the good leader with triggered number of armies.

for exp : i want to set the trigger commands an orc race trains a hero,then 5 grunts, 2 troll berserkers for the first wave map exploration and ambush.
then add one more hero also train 5 raiders, 5 troll berserkers and 5 witch doctors for the second wave map exploration.

also how to set triggers for AI heroes to pick great n use useful items.
the trigger which gives AI heroes random item from the selected item groups for every some minutes game runs .

wish u help me.
thanks 4 viewing

Level 16
Apr 4, 2011
Adding custom data to the AI editor or the Trigger editor makes it non-melee . . .

This is a weird question. The normal AI in wc3 melee maps works perfectly fine (and kicks my ass on anything but easy), so why do you need specific units to be created?

If you're creating a defense type map, and need certain units spawned, and then need the units to attack something, the trigger could look like this:

  • Help Trigger
    • Events
      • Time - Every 120.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Wave Equal to 1
        • Then - Actions
          • -------- Put the (playable map) part of the next trigger to whichever region you want the units to spawn in --------
          • Set Point = (Random point in (Playable map area))
          • -------- Put the unit type you want, then put the player you want it spawned to --------
          • Unit - Create 1 Footman for Player 2 (Blue) at Point facing Default building facing degrees
          • -------- Tell it where you want it to attack/move to --------
          • -------- You should use a variable so you can destroy the leak --------
          • Unit - Order (Last created unit) to Attack-Move To (Random point in (Playable map area))
          • -------- Destroying leak --------
          • Custom script: call RemoveLocation(udg_Point)
        • Else - Actions
          • -------- Etc --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
            • Then - Actions
            • Else - Actions