- Joined
- Jul 8, 2018
- Messages
- 129
I'm having some trouble with vjass AI. Bassicly the AI will produce one coppy of a certain unit and then will stop producing any other units past this. I have the AI code in the spoiler below.
globals
player user = PlayerEx (1)
endglobals
function main takes nothing returns nothing
call CampaignAI(BURROW,null)
call SetReplacements(2,2,1)
call SetSlowChopping(false)
call SetPeonsRepair(true)
call SetBuildUnit ( 10, 'o001' )
call CampaignDefenderEx( 2, 4, 6, 'o005' )
call CampaignDefenderEx( 2, 4, 6, 'o002' )
call CampaignDefenderEx( 1, 1, 2, 'n002' )
call CampaignDefenderEx( 1, 2, 4, 'o00A' )
call CampaignDefenderEx( 1, 2, 4, 'o00B' )
//***wave 1
call InitAssaultGroup()
call CampaignAttackerEx( 2, 3, 5, 'o005' ) < builds one of
call CampaignAttackerEx( 4, 5, 7, 'o002' ) < works
call CampaignAttackerEx( 1, 1, 1, 'O00G' ) < builds none
call CampaignAttackerEx( 3, 4, 6, 'o003' ) < builds none
call SuicideOnPlayerEx( M6, M5, M4, user )
//***wave 2
call InitAssaultGroup()
call CampaignAttackerEx( 2, 4, 5, 'o005' ) < none
call CampaignAttackerEx( 5, 6, 8, 'o002' ) < all
call CampaignAttackerEx( 3, 4, 6, 'o003' ) < one
call CampaignAttackerEx( 1, 1, 1, 'O00G' ) < none
call CampaignAttackerEx( 1, 2, 3, 'o00C' ) < none
call SuicideOnPlayerEx( M6, M5, M4, user )
//***wave 3
Didn't include the waves below
player user = PlayerEx (1)
endglobals
function main takes nothing returns nothing
call CampaignAI(BURROW,null)
call SetReplacements(2,2,1)
call SetSlowChopping(false)
call SetPeonsRepair(true)
call SetBuildUnit ( 10, 'o001' )
call CampaignDefenderEx( 2, 4, 6, 'o005' )
call CampaignDefenderEx( 2, 4, 6, 'o002' )
call CampaignDefenderEx( 1, 1, 2, 'n002' )
call CampaignDefenderEx( 1, 2, 4, 'o00A' )
call CampaignDefenderEx( 1, 2, 4, 'o00B' )
//***wave 1
call InitAssaultGroup()
call CampaignAttackerEx( 2, 3, 5, 'o005' ) < builds one of
call CampaignAttackerEx( 4, 5, 7, 'o002' ) < works
call CampaignAttackerEx( 1, 1, 1, 'O00G' ) < builds none
call CampaignAttackerEx( 3, 4, 6, 'o003' ) < builds none
call SuicideOnPlayerEx( M6, M5, M4, user )
//***wave 2
call InitAssaultGroup()
call CampaignAttackerEx( 2, 4, 5, 'o005' ) < none
call CampaignAttackerEx( 5, 6, 8, 'o002' ) < all
call CampaignAttackerEx( 3, 4, 6, 'o003' ) < one
call CampaignAttackerEx( 1, 1, 1, 'O00G' ) < none
call CampaignAttackerEx( 1, 2, 3, 'o00C' ) < none
call SuicideOnPlayerEx( M6, M5, M4, user )
//***wave 3
Didn't include the waves below