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

[GUI] AOS AI System v1.1

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
[GUI] AOS AI System

No need to use JASS for AI any more!!

What does this AI do?


+Looks for targets and attack them.
+AI Status System. (Shows what the AI is doing.)
+Advanced item pick system. (AI will pick items with higher levels.)
+Retreats when there's too many enemies.
+Retreats when they are dying.
+Buys iems.
+AI chases dying enemy heroes.
+AI heroes try to last hit.
+AI heroes learn skills.
+A standard multiboard.


Known issues

-Can cause FPS drop if there's too many units in the map. (400+)

  • AI Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Player_Color[1] = |c00ff0202
      • Set Player_Color[2] = |c000041ff
      • Set Player_Color[3] = |c001be5b8
      • Set Player_Color[4] = |c00530080
      • Set Player_Color[5] = |c00ffff00
      • Set Player_Color[6] = |c00fe890d
      • Set Player_Color[7] = |c001FBF00
      • Set Player_Color[8] = |c00E45AAA
      • Set Player_Color[9] = |c00949596
      • Set Player_Color[10] = |c007DBEF1
      • Set Player_Color[11] = |c000F6145
      • Set Player_Color[12] = |c004D2903
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • -------- In here add the players that controls the creeps. So the AI system won't mess up with the creeps movement. --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) controller) Equal to Computer
              • (Picked player) Not equal to Player 1 (Red)
              • (Picked player) Not equal to Player 5 (Yellow)
              • (Picked player) Not equal to Player 9 (Gray)
            • Then - Actions
              • Set AI_Target_Unit[(Player number of (Picked player))] = No unit
              • Player Group - Add (Picked player) to AI_Players
            • Else - Actions
      • Set Configure_Item_Pick_Range = 500.00
      • -------- The range that AI heroes try to last hit and chase dying heroes. --------
      • Set Configure_Attack_Range = 800.00
      • -------- AI hero will chase heroes when life is under **% --------
      • Set Configure_Attack_Hero = 35.00
      • -------- AI hero will attack creeps to get last hit when their life is under the value below. --------
      • Set Configure_Attack_Creep = 40.00
      • -------- AI hero will retreat when life is under **% --------
      • Set Configure_Hero_Retreat = 35.00
      • -------- AI will flee when the gap of HP is more than *** --------
      • Set Configure_Flee = 800.00
      • -------- You can change the text below if you want --------
      • Set AI_Status_Text[0] = Moving
      • Set AI_Status_Text[2] = Fleeing
      • Set AI_Status_Text[3] = Fighting
      • Set AI_Status_Text[4] = Dead
      • -------- Set the item build. You can have more than 6 item builds. --------
      • Set AI_Item[1] = Claws of Attack +15
      • Set AI_ItemCost[1] = 500
      • Set AI_Item[2] = Mask of Death
      • Set AI_ItemCost[2] = 600
      • Set AI_Item[3] = Crown of Kings +5
      • Set AI_ItemCost[3] = 800
      • Set AI_Item[4] = Potion of Healing
      • Set AI_ItemCost[4] = 50
      • Set AI_Item[5] = Ring of Protection +5
      • Set AI_ItemCost[5] = 500
      • Set AI_Item[6] = Horn of Cenarius
      • Set AI_ItemCost[6] = 1000
      • -------- Numbers of total ite builds. --------
      • Set Configure_Max_Item = 6
      • -------- Set the shops here. --------
      • Trigger - Add to AI Item Buy <gen> the event (Unit - A unit comes within 800.00 of Goblin Merchant 0135 <gen>)
      • Trigger - Add to AI Item Buy <gen> the event (Unit - A unit comes within 800.00 of Goblin Merchant 0137 <gen>)
      • Trigger - Add to AI Item Buy <gen> the event (Unit - A unit comes within 800.00 of Goblin Merchant 0136 <gen>)
      • Hashtable - Create a hashtable
      • Set Ability_Hashtable = (Last created hashtable)
      • -------- Get the raw code of the Hero and the Ability. The first key is the raw code of the Hero and the second key is the level to learn it. --------
      • -------- Press "ctrl + T" in object editor. --------
      • -------- Then put the Raw code of your custom hero to the line below. Like this "set udg_TempInteger2 = 'Raw Code'" --------
      • Custom script: set udg_TempInteger2 = 'Hpal'
      • -------- Now get the Raw Code of the hero's ability and put it to the line below. Like this "set udg_TempInteger = 'Ability Raw Code'" --------
      • Custom script: set udg_TempInteger = 'AHhb'
      • -------- Now change the numbers to the level you want the AI hero to learn the skill you set above. --------
      • Hashtable - Save TempInteger as TempInteger2 of 1 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 4 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 8 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AHds'
      • Hashtable - Save TempInteger as TempInteger2 of 2 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 5 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 9 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AHad'
      • Hashtable - Save TempInteger as TempInteger2 of 3 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 7 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 10 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AHre'
      • Hashtable - Save TempInteger as TempInteger2 of 6 in Ability_Hashtable
      • Custom script: set udg_TempInteger2 = 'Hamg'
      • Custom script: set udg_TempInteger = 'AHbz'
      • Hashtable - Save TempInteger as TempInteger2 of 1 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 4 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 8 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AHwe'
      • Hashtable - Save TempInteger as TempInteger2 of 2 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 5 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 9 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AHab'
      • Hashtable - Save TempInteger as TempInteger2 of 3 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 7 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 10 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AHmt'
      • Hashtable - Save TempInteger as TempInteger2 of 6 in Ability_Hashtable
      • Custom script: set udg_TempInteger2 = 'Hmkg'
      • Custom script: set udg_TempInteger = 'AHtb'
      • Hashtable - Save TempInteger as TempInteger2 of 1 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 4 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 8 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AHtc'
      • Hashtable - Save TempInteger as TempInteger2 of 2 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 5 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 9 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AHbh'
      • Hashtable - Save TempInteger as TempInteger2 of 3 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 7 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 10 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AHav'
      • Hashtable - Save TempInteger as TempInteger2 of 6 in Ability_Hashtable
      • Custom script: set udg_TempInteger2 = 'Hblm'
      • Custom script: set udg_TempInteger = 'AHfs'
      • Hashtable - Save TempInteger as TempInteger2 of 1 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 4 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 8 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AHbn'
      • Hashtable - Save TempInteger as TempInteger2 of 2 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 5 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 9 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AHdr'
      • Hashtable - Save TempInteger as TempInteger2 of 3 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 7 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 10 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AHpx'
      • Hashtable - Save TempInteger as TempInteger2 of 6 in Ability_Hashtable
      • Custom script: set udg_TempInteger2 = 'Obla'
      • Custom script: set udg_TempInteger = 'AOwk'
      • Hashtable - Save TempInteger as TempInteger2 of 1 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 4 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 8 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AOmi'
      • Hashtable - Save TempInteger as TempInteger2 of 2 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 5 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 9 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AOcr'
      • Hashtable - Save TempInteger as TempInteger2 of 3 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 7 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 10 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AOww'
      • Hashtable - Save TempInteger as TempInteger2 of 6 in Ability_Hashtable
      • Custom script: set udg_TempInteger2 = 'Ofar'
      • Custom script: set udg_TempInteger = 'AOcl'
      • Hashtable - Save TempInteger as TempInteger2 of 1 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 4 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 8 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AOfs'
      • Hashtable - Save TempInteger as TempInteger2 of 2 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 5 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 9 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AOsf'
      • Hashtable - Save TempInteger as TempInteger2 of 3 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 7 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 10 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AOeq'
      • Hashtable - Save TempInteger as TempInteger2 of 6 in Ability_Hashtable
      • Custom script: set udg_TempInteger2 = 'Otch'
      • Custom script: set udg_TempInteger = 'AOsh'
      • Hashtable - Save TempInteger as TempInteger2 of 1 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 4 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 8 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AOws'
      • Hashtable - Save TempInteger as TempInteger2 of 2 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 5 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 9 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AOae'
      • Hashtable - Save TempInteger as TempInteger2 of 3 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 7 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 10 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AOre'
      • Hashtable - Save TempInteger as TempInteger2 of 6 in Ability_Hashtable
      • Custom script: set udg_TempInteger2 = 'Oshd'
      • Custom script: set udg_TempInteger = 'AOhw'
      • Hashtable - Save TempInteger as TempInteger2 of 1 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 4 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 8 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AOhx'
      • Hashtable - Save TempInteger as TempInteger2 of 2 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 5 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 9 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AOsw'
      • Hashtable - Save TempInteger as TempInteger2 of 3 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 7 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 10 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AOvd'
      • Hashtable - Save TempInteger as TempInteger2 of 6 in Ability_Hashtable
      • Custom script: set udg_TempInteger2 = 'Udea'
      • Custom script: set udg_TempInteger = 'AUdc'
      • Hashtable - Save TempInteger as TempInteger2 of 1 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 4 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 8 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AUdp'
      • Hashtable - Save TempInteger as TempInteger2 of 2 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 5 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 9 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AUau'
      • Hashtable - Save TempInteger as TempInteger2 of 3 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 7 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 10 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AUan'
      • Hashtable - Save TempInteger as TempInteger2 of 6 in Ability_Hashtable
      • Custom script: set udg_TempInteger2 = 'Ulic'
      • Custom script: set udg_TempInteger = 'AUfn'
      • Hashtable - Save TempInteger as TempInteger2 of 1 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 4 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 8 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AUfa'
      • Hashtable - Save TempInteger as TempInteger2 of 2 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 5 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 9 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AUdr'
      • Hashtable - Save TempInteger as TempInteger2 of 3 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 7 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 10 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AUdd'
      • Hashtable - Save TempInteger as TempInteger2 of 6 in Ability_Hashtable
      • Custom script: set udg_TempInteger2 = 'Udre'
      • Custom script: set udg_TempInteger = 'AUcs'
      • Hashtable - Save TempInteger as TempInteger2 of 1 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 4 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 8 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AUsl'
      • Hashtable - Save TempInteger as TempInteger2 of 2 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 5 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 9 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AUav'
      • Hashtable - Save TempInteger as TempInteger2 of 3 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 7 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 10 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AUin'
      • Hashtable - Save TempInteger as TempInteger2 of 6 in Ability_Hashtable
      • Custom script: set udg_TempInteger2 = 'Ucrl'
      • Custom script: set udg_TempInteger = 'AUim'
      • Hashtable - Save TempInteger as TempInteger2 of 1 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 4 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 8 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AUcb'
      • Hashtable - Save TempInteger as TempInteger2 of 2 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 5 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 9 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AUts'
      • Hashtable - Save TempInteger as TempInteger2 of 3 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 7 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 10 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AUls'
      • Hashtable - Save TempInteger as TempInteger2 of 6 in Ability_Hashtable
      • Custom script: set udg_TempInteger2 = 'Ekee'
      • Custom script: set udg_TempInteger = 'AEer'
      • Hashtable - Save TempInteger as TempInteger2 of 1 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 4 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 8 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AEfn'
      • Hashtable - Save TempInteger as TempInteger2 of 2 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 5 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 9 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AEah'
      • Hashtable - Save TempInteger as TempInteger2 of 3 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 7 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 10 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AEtq'
      • Hashtable - Save TempInteger as TempInteger2 of 6 in Ability_Hashtable
      • Custom script: set udg_TempInteger2 = 'Emoo'
      • Custom script: set udg_TempInteger = 'AEst'
      • Hashtable - Save TempInteger as TempInteger2 of 1 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 4 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 8 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AEfa'
      • Hashtable - Save TempInteger as TempInteger2 of 2 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 5 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 9 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AEar'
      • Hashtable - Save TempInteger as TempInteger2 of 3 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 7 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 10 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AEsf'
      • Hashtable - Save TempInteger as TempInteger2 of 6 in Ability_Hashtable
      • Custom script: set udg_TempInteger2 = 'Edem'
      • Custom script: set udg_TempInteger = 'AEmb'
      • Hashtable - Save TempInteger as TempInteger2 of 1 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 4 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 8 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AEim'
      • Hashtable - Save TempInteger as TempInteger2 of 2 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 5 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 9 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AEev'
      • Hashtable - Save TempInteger as TempInteger2 of 3 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 7 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 10 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AEme'
      • Hashtable - Save TempInteger as TempInteger2 of 6 in Ability_Hashtable
      • Custom script: set udg_TempInteger2 = 'Ewar'
      • Custom script: set udg_TempInteger = 'AEfk'
      • Hashtable - Save TempInteger as TempInteger2 of 1 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 4 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 8 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AEbl'
      • Hashtable - Save TempInteger as TempInteger2 of 2 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 5 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 9 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AEsh'
      • Hashtable - Save TempInteger as TempInteger2 of 3 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 7 in Ability_Hashtable
      • Hashtable - Save TempInteger as TempInteger2 of 10 in Ability_Hashtable
      • Custom script: set udg_TempInteger = 'AEsv'
      • Hashtable - Save TempInteger as TempInteger2 of 6 in Ability_Hashtable
      • -------- Remove everything below if you don't want a multiboard or already have one. --------
      • -------- You can edit this part for your map so it will work properly. --------
      • Wait 2.00 seconds
      • Multiboard - Create a multiboard with 5 columns and 12 rows, titled Multiboard
      • Set AI_MultiBoard = (Last created multiboard)
  • AI Move
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in AI_Players and do (Actions)
        • Loop - Actions
          • Set TempPlayer = (Picked player)
          • Set TempGroup = (Units owned by TempPlayer matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is A peon-type unit) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is in AI_Caster) Equal to False) and ((((
          • Unit Group - Pick every unit in TempGroup and do (Actions)
            • Loop - Actions
              • Set TempUnit = (Picked unit)
              • Unit Group - Add TempUnit to AI_Units[(Player number of TempPlayer)]
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (TempUnit is A Hero) Equal to True
                • Then - Actions
                  • Set AI_Hero[(Player number of TempPlayer)] = TempUnit
                • Else - Actions
          • Custom script: call DestroyGroup(udg_TempGroup)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • AI_Target_Unit[(Player number of TempPlayer)] Equal to No unit
            • Then - Actions
              • Set TempGroup = (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) is an enemy of TempPlayer) Equal to True)))
              • Set AI_Target_Unit[(Player number of TempPlayer)] = (Random unit from TempGroup)
              • Custom script: call DestroyGroup(udg_TempGroup)
            • Else - Actions
          • Set TempPoint = (Position of AI_Target_Unit[(Player number of TempPlayer)])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • AI_Status[(Player number of TempPlayer)] Equal to 1
              • ((Percentage life of AI_Hero[(Player number of TempPlayer)]) - (Percentage life of AI_Target_Unit[(Player number of TempPlayer)])) Less than 30.00
            • Then - Actions
              • Unit Group - Order AI_Units[(Player number of TempPlayer)] to Attack AI_Target_Unit[(Player number of TempPlayer)]
              • Set AI_Status[(Player number of TempPlayer)] = 3
            • Else - Actions
              • Unit Group - Order AI_Units[(Player number of TempPlayer)] to Attack-Move To TempPoint
          • Custom script: call RemoveLocation(udg_TempPoint)
          • Item - Pick every item in (Playable map area) and do (Actions)
            • Loop - Actions
              • Set TempItem = (Picked item)
              • For each (Integer A) from 1 to 6, do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Or - Any (Conditions) are true
                        • Conditions
                          • (Item level of (Item carried by AI_Hero[(Player number of TempPlayer)] in slot (Integer A))) Less than (Item level of TempItem)
                          • (Item-class of TempItem) Equal to Powerup
                    • Then - Actions
                      • Set TempPoint = (Position of AI_Hero[(Player number of TempPlayer)])
                      • Set TempPoint2 = (Position of TempItem)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Distance between TempPoint and TempPoint2) Less than Configure_Item_Pick_Range
                        • Then - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Item-class of TempItem) Equal to Powerup
                            • Then - Actions
                              • Unit - Order AI_Hero[(Player number of TempPlayer)] to Right-Click TempItem
                            • Else - Actions
                              • Hero - Drop the item from slot (Integer A) of AI_Hero[(Player number of TempPlayer)]
                              • Unit - Order AI_Hero[(Player number of TempPlayer)] to Right-Click TempItem
                        • Else - Actions
                      • Custom script: call RemoveLocation(udg_TempPoint)
                      • Custom script: call RemoveLocation(udg_TempPoint2)
                    • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • AI_Hero[(Player number of TempPlayer)] Equal to No unit
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • AI_Status[(Player number of TempPlayer)] Not equal to 2
                • Then - Actions
                  • Set AI_Status[(Player number of TempPlayer)] = 4
                • Else - Actions
            • Else - Actions
              • Set AI_Status[(Player number of TempPlayer)] = 0
          • Set TempPoint = (Position of AI_Hero[(Player number of TempPlayer)])
          • Set TempGroup = (Units within Configure_Attack_Range of TempPoint matching ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) is an enemy of TempPlayer) Equal to True)))
          • Unit Group - Pick every unit in TempGroup and do (Actions)
            • Loop - Actions
              • Set TempUnit = (Picked unit)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (TempUnit is A Hero) Equal to True
                  • (Percentage life of TempUnit) Less than Configure_Attack_Hero
                  • (Percentage life of AI_Hero[(Player number of TempPlayer)]) Greater than 70.00
                • Then - Actions
                  • Set AI_Status[(Player number of TempPlayer)] = 1
                  • Set AI_Target_Unit[(Player number of TempPlayer)] = TempUnit
                • Else - Actions
                  • Set AI_Status[(Player number of (Owner of (Triggering unit)))] = 0
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Life of TempUnit) Less than Configure_Attack_Creep
                  • AI_Status[(Player number of TempPlayer)] Not equal to 1
                • Then - Actions
                  • Unit - Order AI_Hero[(Player number of TempPlayer)] to Attack TempUnit
                • Else - Actions
          • Custom script: call RemoveLocation(udg_TempPoint)
          • Custom script: call DestroyGroup(udg_TempGroup)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Percentage life of AI_Hero[(Player number of TempPlayer)]) Less than Configure_Hero_Retreat
            • Then - Actions
              • Set AI_Status[(Player number of TempPlayer)] = 2
              • Unit Group - Remove AI_Hero[(Player number of TempPlayer)] from AI_Units[(Player number of TempPlayer)]
              • Unit Group - Add AI_Hero[(Player number of TempPlayer)] to AI_Injured
              • Set AI_Hero[(Player number of TempPlayer)] = No unit
            • Else - Actions
      • Unit Group - Pick every unit in AI_Injured and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Percentage life of TempUnit) Less than 100.00
            • Then - Actions
              • Set TempPoint = ((Owner of TempUnit) start location)
              • Unit - Order TempUnit to Move To TempPoint
              • Custom script: call RemoveLocation(udg_TempPoint)
            • Else - Actions
              • Set TempUnit = AI_Hero[(Player number of (Owner of TempUnit))]
              • Unit Group - Remove TempUnit from AI_Injured
              • Unit Group - Add TempUnit to AI_Units[(Player number of TempPlayer)]
      • Trigger - Run AI Status Refresh <gen> (checking conditions)
  • AI Flee
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Owner of (Attacking unit)) is an enemy of (Owner of (Triggering unit))) Equal to True
      • ((Owner of (Triggering unit)) is in AI_Players) Equal to True
      • AI_Status[(Player number of (Triggering player))] Not equal to 1
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is A Hero) Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Owner of (Attacking unit)) is in AI_Players) Equal to True
            • Then - Actions
              • Multiboard - Set the text for AI_MultiBoard item in column 2, row (Player number of (Owner of (Attacking unit))) to (vs + (Name of (Owner of (Triggering unit))))
            • Else - Actions
        • Else - Actions
          • Set AI_Status[(Player number of (Owner of (Attacking unit)))] = 3
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Attacking unit) is A Hero) Equal to True
        • Then - Actions
          • Multiboard - Set the text for AI_MultiBoard item in column 2, row (Player number of (Owner of (Triggering unit))) to (vs + (Name of (Owner of (Attacking unit))))
        • Else - Actions
          • Set AI_Status[(Player number of (Owner of (Attacking unit)))] = 3
      • Set AI_Target_Unit[(Player number of (Owner of (Triggering unit)))] = (Attacking unit)
      • Set TempPoint = (Position of (Triggering unit))
      • Set TempGroup = (Units within 500.00 of TempPoint matching ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) is an ally of (Owner of (Triggering unit))) Equal to True)))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Set TempReal = (TempReal + (Life of (Picked unit)))
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call DestroyGroup(udg_TempGroup)
      • Set TempPoint = (Position of (Attacking unit))
      • Set TempGroup = (Units within 500.00 of TempPoint matching ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) is an ally of (Owner of (Attacking unit))) Equal to True)))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Set TempReal2 = (TempReal2 + (Life of (Picked unit)))
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call DestroyGroup(udg_TempGroup)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (TempReal2 - TempReal) Greater than or equal to Configure_Flee
        • Then - Actions
          • Set AI_Status[(Player number of (Owner of (Triggering unit)))] = 2
          • Set TempPoint = ((Owner of (Triggering unit)) start location)
          • Unit Group - Order AI_Units[(Player number of (Owner of (Triggering unit)))] to Move To TempPoint
          • Custom script: call RemoveLocation(udg_TempPoint)
        • Else - Actions
          • Set AI_Status[(Player number of (Owner of (Triggering unit)))] = 3
      • Set TempReal = 0.00
      • Set TempReal2 = 0.00
      • Trigger - Run AI Status Refresh <gen> (checking conditions)
  • AI Skill Learn
    • Events
      • Unit - A unit enters (Playable map area)
      • Unit - A unit Gains a level
    • Conditions
      • ((Owner of (Triggering unit)) is in AI_Players) Equal to True
    • Actions
      • Custom script: call SelectHeroSkill( GetTriggerUnit(), LoadInteger(udg_Ability_Hashtable, GetUnitLevel(GetTriggerUnit()), GetUnitTypeId(GetTriggerUnit())))
  • AI Cast Start
    • Events
      • Unit - A unit Starts the effect of an ability
      • Unit - A unit Begins casting an ability
    • Conditions
      • ((Owner of (Triggering unit)) is in AI_Players) Equal to True
    • Actions
      • Unit Group - Remove (Triggering unit) from AI_Units[(Player number of (Owner of (Triggering unit)))]
      • Unit Group - Add (Triggering unit) to AI_Caster
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is A Hero) Equal to True
        • Then - Actions
          • Set AI_Hero[(Player number of (Owner of (Triggering unit)))] = No unit
        • Else - Actions
  • AI Cast End
    • Events
      • Unit - A unit Finishes casting an ability
      • Unit - A unit Stops casting an ability
    • Conditions
      • ((Owner of (Triggering unit)) is in AI_Players) Equal to True
    • Actions
      • Unit Group - Add (Triggering unit) to AI_Units[(Player number of (Owner of (Triggering unit)))]
      • Unit Group - Remove (Triggering unit) from AI_Caster
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is A Hero) Equal to True
        • Then - Actions
          • Set AI_Hero[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
        • Else - Actions
  • AI Remove Dead Units
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is A Hero) Equal to True
        • Then - Actions
          • Set Kills[(Player number of (Owner of (Killing unit)))] = (Kills[(Player number of (Owner of (Killing unit)))] + 1)
          • Set Deaths[(Player number of (Owner of (Triggering unit)))] = (Deaths[(Player number of (Owner of (Triggering unit)))] + 1)
        • Else - Actions
      • Unit Group - Remove (Triggering unit) from AI_Caster
      • Unit Group - Remove (Triggering unit) from AI_Injured
      • Player Group - Pick every player in AI_Players and do (Actions)
        • Loop - Actions
          • Unit Group - Remove (Triggering unit) from AI_Units[(Player number of (Picked player))]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Triggering unit) Equal to AI_Target_Unit[(Player number of (Picked player))]
            • Then - Actions
              • Set AI_Target_Unit[(Player number of (Picked player))] = No unit
            • Else - Actions
  • AI Item Buy
    • Events
    • Conditions
      • ((Owner of (Triggering unit)) is in AI_Players) Equal to True
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • For each (Integer A) from 1 to Configure_Max_Item, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Owner of (Triggering unit)) Current gold) Greater than or equal to AI_ItemCost[(Integer A)]
              • (Item-type of (Item carried by (Triggering unit) of type AI_Item[(Integer A)])) Not equal to AI_Item[(Integer A)]
            • Then - Actions
              • Hero - Create AI_Item[(Integer A)] and give it to (Triggering unit)
              • Player - Add (0 - AI_ItemCost[(Integer A)]) to (Owner of (Triggering unit)) Current gold
            • Else - Actions
  • AI Status Refresh
    • Events
    • Conditions
    • Actions
      • Player Group - Pick every player in AI_Players and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • AI_Status[(Player number of (Picked player))] Not equal to 1
            • Then - Actions
              • Multiboard - Set the text for AI_MultiBoard item in column 5, row (Player number of (Picked player)) to AI_Status_Text[AI_Status[(Player number of (Picked player))]]
            • Else - Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Multiboard - Set the text for AI_MultiBoard item in column 2, row (Player number of (Picked player)) to (String(Kills[(Player number of (Picked player))]))
          • Multiboard - Set the text for AI_MultiBoard item in column 3, row (Player number of (Picked player)) to (String(Deaths[(Player number of (Picked player))]))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • AI_Hero[(Player number of (Picked player))] Not equal to No unit
            • Then - Actions
              • Multiboard - Set the text for AI_MultiBoard item in column 4, row (Player number of (Picked player)) to (String((Hero level of AI_Hero[(Player number of (Picked player))])))
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Execution count of (This trigger)) Less than or equal to 3
            • Then - Actions
              • Multiboard - Set the text for AI_MultiBoard item in column 1, row (Player number of (Picked player)) to (Player_Color[(Player number of (Picked player))] + ((Name of (Picked player)) + |r))
              • Multiboard - Set the width for AI_MultiBoard item in column 0, row 0 to 5.00% of the total screen width
              • Multiboard - Set the width for AI_MultiBoard item in column 1, row 0 to 15.00% of the total screen width
              • Multiboard - Set the width for AI_MultiBoard item in column 5, row 0 to 15.00% of the total screen width
              • Multiboard - Set the display style for AI_MultiBoard item in column 0, row 0 to Show text and Hide icons
              • Multiboard - Set the text for AI_MultiBoard item in column 5, row 1 to AI Status
              • Multiboard - Set the text for AI_MultiBoard item in column 5, row 5 to AI Status
              • Multiboard - Set the text for AI_MultiBoard item in column 5, row 9 to AI Status
            • Else - Actions
      • Multiboard - Set the text for AI_MultiBoard item in column 2, row 1 to |c00FF0000K|r
      • Multiboard - Set the text for AI_MultiBoard item in column 3, row 1 to |c000000FFD|r
      • Multiboard - Set the text for AI_MultiBoard item in column 4, row 1 to L
      • Multiboard - Set the text for AI_MultiBoard item in column 2, row 5 to |c00FF0000K|r
      • Multiboard - Set the text for AI_MultiBoard item in column 3, row 5 to |c000000FFD|r
      • Multiboard - Set the text for AI_MultiBoard item in column 4, row 5 to L
      • Multiboard - Set the text for AI_MultiBoard item in column 2, row 9 to |c00FF0000K|r
      • Multiboard - Set the text for AI_MultiBoard item in column 3, row 9 to |c000000FFD|r
      • Multiboard - Set the text for AI_MultiBoard item in column 4, row 9 to L
-After you import these triggers, set the array size of vairables to 12. And then see AI initialization to change most things. Don't touch the others.


v1.0 First Release
v1.1 Minor bug fix. Made the multiboard better.


Please give credits when used for your map.

Please tell me if the AI doesn't play properly.

Also feel free to rate and comment


Keywords:
AI, System, AOS, Chase, Retreat, Flee, Multiboard, shinji.
Contents

[GUI] AOS AI System (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. 02:27, 19th Jul 2012 Magtheridon96: There needs to be an easier way for users to register spells in a configuration trigger. Another good thing would be for you to start storing certain...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.

02:27, 19th Jul 2012
Magtheridon96:
There needs to be an easier way for users to register spells in a configuration trigger.
Another good thing would be for you to start storing certain things in variables when they occur more than once.
For example, if you retrieve the player number of a certain player twice, it would be more efficient to store that value into a variable, and use the variable instead.

Those changes would be a start.
 
Well your Multiboard looks absolutely horrid, get some colours/icons on there (no offence) Also the way in which the configuring of each ability is done, is well not exactly the best, it'd take forever for a person to set up all the correct abilities every hero in a normal AOS, also what if heros share the same ability but want them to learn them at different stages?

You should change the part below for this sort of thing to just pick units owned by TempPlayer and /then/ run through the conditions, because what if they /do/ want their hero to attack peon-type units? going through all that long condition to find it would be very annoying and difficult

  • Set TempGroup = (Units owned by TempPlayer matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is A peon-type unit) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is in AI_Caster) Equal to False) and (...)


You don't need that wait at the start btw, just hide and then show the multiboard at the end of the trigger and the wait isn't needed.

When Heros are fighting, I don't think it can identify if its opponent is a players hero

The spacing on the Multiboard is pretty poor, you should say that a slot is Empty when there is no player/hero there, and also identify which heros are AI controlled and which are Human

That's all I got for now
 
Level 14
Joined
Jul 25, 2011
Messages
1,065
Well your Multiboard looks absolutely horrid, get some colours/icons on there (no offence) Also the way in which the configuring of each ability is done, is well not exactly the best, it'd take forever for a person to set up all the correct abilities every hero in a normal AOS, also what if heros share the same ability but want them to learn them at different stages?

You should change the part below for this sort of thing to just pick units owned by TempPlayer and /then/ run through the conditions, because what if they /do/ want their hero to attack peon-type units? going through all that long condition to find it would be very annoying and difficult

  • Set TempGroup = (Units owned by TempPlayer matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is A peon-type unit) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is in AI_Caster) Equal to False) and (...)


You don't need that wait at the start btw, just hide and then show the multiboard at the end of the trigger and the wait isn't needed.

When Heros are fighting, I don't think it can identify if its opponent is a players hero

The spacing on the Multiboard is pretty poor, you should say that a slot is Empty when there is no player/hero there, and also identify which heros are AI controlled and which are Human

That's all I got for now

Ok. I'll try io improve the AI player name and the multi board.
 
Exactly the point, unless you make it hero specific, it will just be like playing with noobs... and who wanna play with noobs? well maybe the other noobs...

especially the chasing and flee... for better result, you will need to check the unit's mana too and what spells he have to determine whether he should go for a kill or not... for example: what if its a spell caster with not much damage and then has no mana left to cast, has 60% hp and enemy has 20% HP, will you still go for it? probably not unless you have really fast movespeed... or what if that 20% hp is still around 1000?

You mean the damage than can be done by a unit? you can register damages and such into a system then track items too... all I can say is that its a lot of work...

and oh, it might seem that I make this look bad, but let me tell you, this is by far the best one I've seen... it's just that AoS AI needs a lot more to be really good... I personally think that making a good general AoS AI system is pretty much impossible because each AoS can have different features... meaning general systems will only be usable on basic/standard AoS maps like DotA, yes, I consider DotA as just a standard AoS map, its cool to play but nothing really special...
 
yeah... the system itself is already fine for all I care, since it already functions as intended... but the improvements will certainly make it a lot better... even just that computation to determine whether to go in or out can already make a huge leap for this system... and usable for more maps too... there are lots of people requesting for this system you know? I'm pretty sure they will be very happy to know that someone is making an AoS AI system for public use... :)

I for one, did not really expect that someone would even try... XD...
 
Well, there really isn't much GUI systems out there especially AoS AI... not even in JASS/vJASS...

and the effort in doing an AI ,which in a sense is very much map specific, is too large already, how much more for a system which tries to cater the general public? Because at least for map specific AI, you have a particular direction already; while in a general AI, you need to consider the broadest range of things that you can imagine... and all the more if you're doing it in GUI...

I suggest focusing first on the actual AI because the multiboard is just an accessory anyway... so making it look good should not be top priority... and the one to use this might even have a multiboard system already...

I think so too... and Magtheridon96 too...
 
Level 1
Joined
Jun 22, 2012
Messages
2
flee problem

hey i got
problem with your ai system, when ally dying and flees, it won't attack again and stay flee in the multiboard status, can u help me with this problem ?
PS: when this problem accured, ai stand still in it's base with full health but still won't move and still in flee mode
 
Level 14
Joined
Jul 25, 2011
Messages
1,065
hey i got
problem with your ai system, when ally dying and flees, it won't attack again and stay flee in the multiboard status, can u help me with this problem ?
PS: when this problem accured, ai stand still in it's base with full health but still won't move and still in flee mode

Yes. That happens some times. I have no idea why does it happen.
 
Level 1
Joined
Jun 22, 2012
Messages
2
right now, the only way to fixed that is to kill the ai hero when it flee into the base and killed it,the ai will change the mode tu move after it's revival, but when i tried in your original map, i see this problem accuered when 5(me and ai) vs 1(ai)..
 
Level 14
Joined
Jul 25, 2011
Messages
1,065
right now, the only way to fixed that is to kill the ai hero when it flee into the base and killed it,the ai will change the mode tu move after it's revival, but when i tried in your original map, i see this problem accuered when 5(me and ai) vs 1(ai)..

I have read the code like 5 times and I can't figure out why it's happening. The most weird part is, it doesn't always happen.
 

Wrda

Spell Reviewer
Level 28
Joined
Nov 18, 2012
Messages
1,994
It can be hard for workers build buildings because you dont know the exactly place where to build it, only if it was like lumber mill, build near trees or town hall near a free goldmine, the rest of the other buildings are hard to "place" them by triggers, even when you finish a building, you must create a variable for it so you can later train units.
 

Wrda

Spell Reviewer
Level 28
Joined
Nov 18, 2012
Messages
1,994
Lols, is this compatible with custom items and recipes? Plus can you customise AI so that it goes by builds?
Of course. Why would I post this if it doesn't.
It can be hard for workers build buildings because you dont know the exactly place where to build it, only if it was like lumber mill, build near trees or town hall near a free goldmine, the rest of the other buildings are hard to "place" them by triggers, even when you finish a building, you must create a variable for it so you can later train units.
 
Level 8
Joined
Aug 8, 2010
Messages
51
Amazing work guy!
Just take care of this:
-AI drop an item to take another one, even if they have an empty slot;
-AI initially don't move, I need an extra trigger to move them at the start.
I hope you can gonna fix the death/flee stun, it will be perfect.

PS: Why do you use so many temporary variables? Just use "picked unit" and "picked player" when you can, because pick unit, store them and immediately use stored units isn't the best way i think...

Have a nice day.

__~~--~~__

OK thanks for the advice, when you think about it it's more logical.
 
Last edited:
PS: Why do you use so many temporary variables? Just use "picked unit" and "picked player" when you can, because pick unit, store them and immediately use stored units isn't the best way i think...

this is a bad way to look at it u should always use temp variables. temp variables are a lot faster. and if u follow the temp rule u only need 1 temp variable of each type for all of ur triggers. this system could be improved for efficiency all the integer A's are slow u should make ur own integer and use that. u also dont follow the normal coding rule of if u use something more than twice put it into a variable as that is were speed and efficiency start to reduce. ex u use triggering unit a lot. u also use player number of something a lot. these should all be put into temp variables. other than that this looks like a good system for GUIers
 
Level 5
Joined
Aug 29, 2014
Messages
105
-After you import these triggers, set the array size of vairables to 12. And then see AI initialization to change most things. Don't touch the others.

How to do that one.... ????
Its that the variables that have an Green X on the WE.? Can anyone Tell me-
How to Fixed it. :confused:

Because, When I import this AI AOS the hero will not moving even the controller is Computer.
In the Multiboard Say Moving but the Hero Computer is Not Moving?:goblin_jawdrop:

Ins't It my Team is 2 and The Deafault Team is 3-like Yours?
How can i Improve it into 2 Teams??:eekani:
Can anyone Convert it Into 2 Teams if The Deafault Team is 3.:goblin_good_job:
 
Level 5
Joined
Aug 29, 2014
Messages
105
when the Computer AI back to the Start Location to make there life is Full But cannot move back in the Battle Arena


How to order the Computer AI to back into the Battle when there Life is Full.:eekani::eekani:


My map is going to Finish but the AI still not Approved.

PLEASE Anyone can Help me!:cry:
:fp:I Really need Your Help especially shinji the Author<====

  • Actions
    • Unit Group - Pick every unit in AI_Injured and do (Actions)
      • Loop - Actions
        • Set TempUnit = (Picked unit)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Percentage life of TempUnit) Less than 100.00
          • Then - Actions
            • Set TempPoint = ((Owner of TempUnit) start location)
            • Unit - Order TempUnit to Move To TempPoint
            • Custom script: call RemoveLocation(udg_TempPoint)
          • Else - Actions
            • Set TempUnit = AI_Hero[(Player number of (Owner of TempUnit))]
            • Unit Group - Remove TempUnit from AI_Injured
            • Unit Group - Add TempUnit to AI_Units[(Player number of TempPlayer)]
 
Top