Hello Everyone
I'm making a campaign (6 maps already) that what you make change the next map in some sort, i.e. If you don't destroy a faction base, they you apear in the next map; if you allies dies in one map, in the next they base will be destroyed too, etc...
Ok, all is going right, everthing is being made in the WE GUI =) Even the AI's is being made in the AI Editor.
But this editor is horrible... Have problems for units returning from battle, farm bug etc...
Every map is going well, but the AI sometimes suck and I wish to fix this to make the maps better.
So i'm using JASS (i'm noob) to recreate the AI's.
The AI's is VERY simple, even only using attack waves...
THE PROBLEM: I can't make a simple thing, ordering a AI attack like player Blue and after some event in the map, they change the target to player RED using a trigger (Send AI Command)
How I do that??
I'm making a campaign (6 maps already) that what you make change the next map in some sort, i.e. If you don't destroy a faction base, they you apear in the next map; if you allies dies in one map, in the next they base will be destroyed too, etc...
Ok, all is going right, everthing is being made in the WE GUI =) Even the AI's is being made in the AI Editor.
But this editor is horrible... Have problems for units returning from battle, farm bug etc...
Every map is going well, but the AI sometimes suck and I wish to fix this to make the maps better.
So i'm using JASS (i'm noob) to recreate the AI's.
The AI's is VERY simple, even only using attack waves...
THE PROBLEM: I can't make a simple thing, ordering a AI attack like player Blue and after some event in the map, they change the target to player RED using a trigger (Send AI Command)
How I do that??
JASS:
globals
player Player_1 = Player( 0 )
endglobals
function ConfigureAI takes nothing returns nothing
call SetSlowChopping( true )
call SetPeonsRepair( true )
endfunction
function main takes nothing returns nothing
call CampaignAI( 'npgf', null )
call ConfigureAI( )
set do_campaign_farms = false
// **********************************
// * Building Strategy *
// **********************************
call SetReplacements( 3, 3, 3 )
call SetBuildUnit( 6, 'ohun' )
call CampaignDefenderEx( 2, 2, 2, 'ohun' )
//**********************************
//* End Building Strategy *
//**********************************
//**********************************
//* Attack Strategy *
//**********************************
//*** WAVE 1 ***
call InitAssaultGroup()
call CampaignAttackerEx( 3, 3, 3, 'ohun' )
call SuicideOnPlayerEx( 30, 30, 30, Player_1 )
//*** WAVE 2 ***
call InitAssaultGroup()
call CampaignAttackerEx( 4, 4, 4, 'ohun' )
call SuicideOnPlayerEx( 70, 70, 70, Player_1 )
//*** WAVE 3 ***
call InitAssaultGroup()
call CampaignAttackerEx( 5, 5, 5, 'ohun' )
call SuicideOnPlayerEx( 70, 70, 70, Player_1 )
//*** WAVE 4 ***
call InitAssaultGroup()
call CampaignAttackerEx( 2, 2, 2, 'ohun' )
call SuicideOnPlayerEx( 70, 70, 70, Player_1 )
loop
//*** LAST WAVE ***
call InitAssaultGroup()
call CampaignAttackerEx( 6, 6, 6, 'ohun' )
call SuicideOnPlayerEx( 70, 70, 70, Player_1 )
call InitAssaultGroup()
call CampaignAttackerEx( 3, 3, 3, 'ohun' )
call SuicideOnPlayerEx( 70, 70, 70, Player_1 )
endloop
//**********************************
//* Attack Strategy never ends *
//**********************************
endfunction