- Joined
- Feb 28, 2007
- Messages
- 3,479
I followed Moyack's campaign AI tutorial here on the hive and came up with this, though the attacks won't begin, and I would like to know why. I have imported the .ai file and used a trigger that starts it, so I believed there was something up with the code. I'll be thankful for any help, thanks!
JASS:
globals
player MyVictim = Player ( 0 )
endglobals
function setup takes nothing returns nothing
call SetSlowChopping (true)
call SetPeonsRepair (false)
endfunction
function main takes nothing returns nothing
call CampaignAI( FARM, null )
call ConfigureAI( )
call SetReplacements( 2, 3, 4 ) //
call CampaignDefenderEx( 2, 3, 4, hfoo )
loop
call InitAssaultGroup() // <==(1)
call CampaignAttackerEx( 2, 3, 3, Footman )
call CampaignAttackerEx( 1, 1, 1, n600:nhea )
call SuicideOnPlayerEx( M2, M2, M2, MyVictim )
call InitAssaultGroup() // <==(2)
call CampaignAttackerEx( 2, 2, 3, n600:nhea )
call CampaignAttackerEx( 1, 2, 2, Footman )
call SuicideOnPlayerEx( M2, M2, M2, MyVictim )
call InitAssaultGroup() // <==(3)
call CampaignAttackerEx( 3, 3, 3, n600:nhea )
call CampaignAttackerEx( 1, 1, 1, Footman )
call SuicideOnPlayerEx( M2, M2, M2, MyVictim )
call InitAssaultGroup() // <==(4)
call CampaignAttackerEx( 4, 4, 4, Footman )
call SuicideOnPlayerEx( M3, M3, M3, MyVictim )
call InitAssaultGroup() // <==(5)
call CampaignAttackerEx( 1, 1, 2, n600:nhea )
call CampaignAttackerEx( 3, 3, 3, Footman )
call SuicideOnPlayerEx( M2, M2, M2, MyVictim )
endloop
endfunction