HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Campaign AI Not working

02-26-2016, 07:19 PM#1
Tallanar
I'm trying to write my custom Campaign AI, but current I wrote does not work, could someone look into code and show me where did I make mistake?

HTML Code:
globals player Target = Player(3) //Purple Player endglobals function ConfigAI takes nothing returns nothing SetTargetHeroes(true) SetUnitsFlee(false) SetHeroesFlee(false) SetGroupsFlee(false) SetSlowChopping(true) SetPeonsRepair(true) SetHeroesBuyItems(false) SetHeroesTakeItems(false) endfunction function main takes nothing returns nothing call ConfigAI() call CampaignAI(HOUSE, null) call SetBuildUnit(1, HUMAN_ALTAR) call SetBuildUnit(1, BARRACKS) call SetBuildUnit(3, FOOTMAN) call SetBuildUnit(4, HOUSE) call WaitForSignal() loop call InitAssaultGroup() call CampaignAttackerEx(2,2,2, FOOTMAN) call CampaignAttackerEx(1,1,1, PALADIN) call SuicideOnPlayerEx(M5, M4, M2, Target) endloop endfunction

Farms and other buildings are on map
02-27-2016, 01:38 PM#2
moyack
you can check this tutorial of mine about how to implement a campaign AI:

http://blizzardmodding.info/4238/how...a-campaign-ai/
02-29-2016, 01:52 PM#3
Tallanar
I made it with your tutorial and it didn't work, but I found where did I make mistake.
I forgot to set starting resources for player.