I need some help with my AI script. As for a start I won't be creating anything special. I just need some answers.
I have this script:
I don't want the AI do anything, just always keep 5 peasants harvesting gold (1), 3 lumber (2) and replace them if someone kills them (3) plus always have the mentioned campaign defenders (replace them if anyone kills them as well (4)). But the AI messes around, builds tons of farms etc. and that's not in the AI script. How do I make it so that AI does only w(1), (2), (3) and (4)?
thx.[/code]
I have this script:
Code:
//===========================================================================
// The Human Alliance (player 10) -- AI Script
//===========================================================================
globals
endglobals
//===========================================================================
// main
//===========================================================================
function main takes nothing returns nothing
call CampaignAI(HOUSE,null)
call SetReplacements(0,4,0)
call CampaignDefenderEx( 0,5,0, RIFLEMAN )
call CampaignDefenderEx( 0,3,0, FOOTMAN )
call CampaignDefenderEx( 0,3,0, KNIGHT )
loop
call Sleep( 2.5 )
call ClearHarvestAI()
call HarvestGold( 0, 5 )
call HarvestWood( 0, 3 )
endloop
endfunction
I don't want the AI do anything, just always keep 5 peasants harvesting gold (1), 3 lumber (2) and replace them if someone kills them (3) plus always have the mentioned campaign defenders (replace them if anyone kills them as well (4)). But the AI messes around, builds tons of farms etc. and that's not in the AI script. How do I make it so that AI does only w(1), (2), (3) and (4)?
thx.[/code]