[General] Custom Campaign AI

Level 4
Joined
Apr 21, 2016
Messages
31
Hi everyone,

firstly, I'd like to apologise if the answers are located somewhere on the site. It's just that I am new to World Editor and maybe I oversaw a phrase or short of what I am actually seeking.

Point One.
I am making a Custom campaign and have come to a part where I need to make AI for Allied and Hostile factions. A simple base defense and replenish dead units, make wave units and send them to X base.

Point Two.
Make a cutscene after which you gain Hero and X units to control and go around the map while allied AI from Part One does it's thing. You'd have no base of your own.

Point Three.
I plan to add another Allied AI that is rescuable and does the same as AI from Point One.

Do you have any guidelines where to look or any tutorials that can help me with this?

Thank you in advance!
 
The best way to create AI's is by scripting them in JASS which is how Blizzard did theirs. The best guide is this one here Creating AI workflow

So as long as you have a syntax highlighter for JASS you can get started. You can also export the .ai files from the Scripts folder in the MPQ or CASC of the game, since if you're making an AI it's always easiest to copy the existing ones and adjust them as needed.

Hope this helps with Point One. As for Point Two, have you made cutscenes before?
 
Level 4
Joined
Apr 21, 2016
Messages
31
The best way to create AI's is by scripting them in JASS which is how Blizzard did theirs. The best guide is this one here Creating AI workflow

So as long as you have a syntax highlighter for JASS you can get started. You can also export the .ai files from the Scripts folder in the MPQ or CASC of the game, since if you're making an AI it's always easiest to copy the existing ones and adjust them as needed.

Hope this helps with Point One. As for Point Two, have you made cutscenes before?
Thank you for the Point One advice!

I actually lost motivation for a week as I just noticed that all custom models I imported don't get auto imported when you add map into a campaign map set.
Am going back to it from square one.

I haven't made any cutscene, no. But I watched Turnro's video guides
 
Level 30
Joined
Aug 29, 2012
Messages
1,382
You can have a look at some of Blizzard's scripts to have an idea of how it looks. Here's the Orc AI from Blackrock and Roll, very straightforward, it sets a few defenders and creates attack waves. I also suggest Turnro's second tutorial about AIs as well
 

Attachments

  • h02_red.ai
    2.2 KB · Views: 15
I actually lost motivation for a week as I just noticed that all custom models I imported don't get auto imported when you add map into a campaign map set.
Am going back to it from square one.
Yeah you'll want to import the assets into the campaign and not the individual maps. The only things that should be imported per map is stuff like the AIs and Loading screens.
 
Level 4
Joined
Apr 21, 2016
Messages
31
I made this AI to test things. Aim was to add 5000 gold and lumber to Orange Computer and to train 3 footman from barracks before sending them on suicide to Orc Maroon computer base. But nothing happens on the map launch.
1718047007890.png

Player is Light blue, allied AI is Orange, enemy is Maroon. That works.
1718046824636.png

JASS:
// Script Name: Orange_AI_WaveScript.ai
// Description: Script for controlling waves of units for Orange computer AI.

function Tier2Waves takes nothing returns nothing
    // Give Orange computer 5000 gold and lumber
    call SetPlayerState(Player(PLAYER_NEUTRAL_PASSIVE), PLAYER_STATE_RESOURCE_GOLD, 5000)
    call SetPlayerState(Player(PLAYER_NEUTRAL_PASSIVE), PLAYER_STATE_RESOURCE_LUMBER, 5000)

    // Find the barracks
    local unit barrack = GetRandomUnitOfTypeIdMatching(Player(PLAYER_NEUTRAL_PASSIVE), 'hbar')

    // Train three footmen
    local integer i = 0
    loop
        exitwhen i >= 3
        call UnitTrainPeon(barrack, 'hfoo') // Train footman
        set i = i + 1
    endloop

    // Create wave
    call InitAssaultGroup()
    call CampaignAttackerEx(3, 3, 3, 'hfoo') // Three footmen
    call SuicideOnPlayerEx(Player(PLAYER_NEUTRAL_PASSIVE), Player(PLAYER_MAROON), 7, 7, 5, player[Player(PLAYER_NEUTRAL_PASSIVE)]) // Send the wave to attack maroon base
endfunction
 

Attachments

  • Orange_AI_WaveScript.ai
    1,018 bytes · Views: 4
  • 1718046939517.png
    1718046939517.png
    39.5 KB · Views: 4
Your script isn't formatted properly for an AI script. Look at Chaosium's example and just adjust it as necessary. I'd give the player the resources using the trigger actions and then for the AI script you can just use the line

call SetBuildUnitEx( 3,3,3, FOOTMAN )

then

call CampaignAttackerEx ( 3,3,3, FOOTMAN )
call SuicideOnPlayer(M1, Player(12))

For an attack on Maroon.

I've attached a very basic script I wrote myself for a campaign base defence and attack. It also shows how to use custom units etc, this script will also rebuild it's pre-placed units.
 

Attachments

  • UndeadScourgeStromgarde04.ai
    5.6 KB · Views: 11
Level 28
Joined
Dec 3, 2020
Messages
968
You can have a look at some of Blizzard's scripts to have an idea of how it looks. Here's the Orc AI from Blackrock and Roll, very straightforward, it sets a few defenders and creates attack waves. I also suggest Turnro's second tutorial about AIs as well
The tutorial he has is pretty good, although I think it could go into a little bit more depth (while still keeping it simple enough to comprehend).
 
Level 4
Joined
Apr 21, 2016
Messages
31
Here I am witn an update.

So, I shamelessly took @Footman16 Ai script and adjusted it.
Once I had only footman, it went well. Once I added a custom unit I got error upon clicking the Custom Campaign name in the Custom Campaign list within the game.
1718476050243.png


Ok, thought it's the custom unit and removed it, leaving only footman but error still persisted.
I removed the script completely from trigger and imported but same error.
I redid all the custom elements on the map, saved it as separate entity, deleted the initial map from the campaign map list and imported new but same error.
Went and did Scan and Repair of the Wc3, but same error appears.

Any ideas?

Added campaign in the attachment
 

Attachments

  • FoA.w3n
    3.6 MB · Views: 10
  • OrangeAI_map01.ai
    1.4 KB · Views: 5
Level 4
Joined
Apr 21, 2016
Messages
31
Update

The script works great with maintaining/rebuilding defensive forces and pulling wave designated number of units in the peasant line but it doesn't execute attack/suicide onto the enemy base.
JASS:
//============================================================================
//  Collecting the Scraps 01 -- AI Script
//============================================================================
globals
    player Reginald_Forces = PlayerEx(6) //player 6 Orange
    player Marauding_Orcs = PlayerEx(13) //player 13 Maroon
  
    constant integer Footman = 'hfoo'
    constant integer Peasant = 'hpea'
    constant integer Archer = 'e600'

    constant integer Hero = 'Hlgr'
endglobals

function main takes nothing returns nothing
    call CampaignAI('hhou',null) //Farm
    call SetReplacements(2,3,4)
    call GroupTimedLife(true)
    call SetPeonsRepair(true)
    call SetSlowChopping(false)
    set campaign_wood_peons = 2
    set campaign_gold_peons = 4

    //Building Strategy
    //Tier 1
    call SetBuildUnitEx(6,6,6,'hpea') //Peasant
    call SetBuildUnitEx(1,1,1,'hbar') //Barracks
    call SetBuildUnitEx(8,8,8,'hhou') //Farm
    call SetBuildUnitEx(1,1,1,'hlum') //Lumbermill
    call SetBuildUnitEx(1,1,1,'hwtw') //Scout Tower
    call SetBuildUnitEx(1,1,1,'halt') //Altar

    //Defender Units
    call CampaignDefenderEx(1,1,1,Hero)
    call CampaignDefenderEx(3,3,3,Footman)
    call CampaignDefenderEx(4,4,4,Archer)

    call WaitForSignal()

    //Attack Waves
 
    loop
  
        //*** WAVE 1 ***
        call InitAssaultGroup()
        call CampaignAttackerEx(5,5,5,Footman)
        call SuicideOnPlayerEx(M1,M1,M1,Marauding_Orcs)    //M2
      
        //*** WAVE 2 ***
        call InitAssaultGroup()
        call CampaignAttackerEx(3,3,3,Footman)
        call CampaignAttackerEx(2,2,2,Archer)
      
        //*** WAVE 3 ***
        call InitAssaultGroup()
        call CampaignAttackerEx(4,4,4,Footman)
        call CampaignAttackerEx(2,2,2,Archer)
        call CampaignAttackerEx(1,1,1,Hero)
      
    endloop
endfunction

I have two triggers created in WorldEditor:

  • OrangeAI
    • Events
      • Map initialization
    • Conditions
    • Actions
      • AI - Start campaign AI script for Player 6 (Orange): OrangeAI_map01.ai
- this trigger to call on the stcript at the map start

  • OrangeAI attack
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
      • (Number of living Footman units owned by Player 6 (Orange)) Greater than or equal to 3
      • (Number of living Archer units owned by Player 6 (Orange)) Equal to 4
      • (Number of living Banneret Alaric units owned by Player 6 (Orange)) Equal to 1
      • (In-game time of day) Equal to 6.00
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • AI - Send Player 6 (Orange) the AI Command (0, 0)
        • Else - Actions
- this triggers aim is to send signal to the previous called script to proceed
JASS:
 call WaitForSignal()

I have also tried this trigger but it returns a syntax error
  • OrangeAI attack
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
      • (Number of living Footman units owned by Player 6 (Orange)) Greater than or equal to 3
      • (Number of living Archer units owned by Player 6 (Orange)) Equal to 4
      • (Number of living Banneret Alaric units owned by Player 6 (Orange)) Equal to 1
      • (In-game time of day) Equal to 6.00
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • Custom script: call CampaignAISetSignal(true)
        • Else - Actions
1718794078840.png


Any idea how to send signal to script to continue?
 
Level 30
Joined
Aug 29, 2012
Messages
1,382
Have you tried removing the if/then/else? You didn't specify a condition in there anyway so it's not useful, and perhaps the "then" actions never fire because of it

Otherwise, try tweaking/removing some or all conditions to see whether they would attack otherwise
 
Level 28
Joined
Dec 3, 2020
Messages
968
Update

The script works great with maintaining/rebuilding defensive forces and pulling wave designated number of units in the peasant line but it doesn't execute attack/suicide onto the enemy base.
JASS:
//============================================================================
//  Collecting the Scraps 01 -- AI Script
//============================================================================
globals
    player Reginald_Forces = PlayerEx(6) //player 6 Orange
    player Marauding_Orcs = PlayerEx(13) //player 13 Maroon
 
    constant integer Footman = 'hfoo'
    constant integer Peasant = 'hpea'
    constant integer Archer = 'e600'

    constant integer Hero = 'Hlgr'
endglobals

function main takes nothing returns nothing
    call CampaignAI('hhou',null) //Farm
    call SetReplacements(2,3,4)
    call GroupTimedLife(true)
    call SetPeonsRepair(true)
    call SetSlowChopping(false)
    set campaign_wood_peons = 2
    set campaign_gold_peons = 4

    //Building Strategy
    //Tier 1
    call SetBuildUnitEx(6,6,6,'hpea') //Peasant
    call SetBuildUnitEx(1,1,1,'hbar') //Barracks
    call SetBuildUnitEx(8,8,8,'hhou') //Farm
    call SetBuildUnitEx(1,1,1,'hlum') //Lumbermill
    call SetBuildUnitEx(1,1,1,'hwtw') //Scout Tower
    call SetBuildUnitEx(1,1,1,'halt') //Altar

    //Defender Units
    call CampaignDefenderEx(1,1,1,Hero)
    call CampaignDefenderEx(3,3,3,Footman)
    call CampaignDefenderEx(4,4,4,Archer)

    call WaitForSignal()

    //Attack Waves
 
    loop
 
        //*** WAVE 1 ***
        call InitAssaultGroup()
        call CampaignAttackerEx(5,5,5,Footman)
        call SuicideOnPlayerEx(M1,M1,M1,Marauding_Orcs)    //M2
  
        //*** WAVE 2 ***
        call InitAssaultGroup()
        call CampaignAttackerEx(3,3,3,Footman)
        call CampaignAttackerEx(2,2,2,Archer)
  
        //*** WAVE 3 ***
        call InitAssaultGroup()
        call CampaignAttackerEx(4,4,4,Footman)
        call CampaignAttackerEx(2,2,2,Archer)
        call CampaignAttackerEx(1,1,1,Hero)
  
    endloop
endfunction

I have two triggers created in WorldEditor:

  • OrangeAI
    • Events
      • Map initialization
    • Conditions
    • Actions
      • AI - Start campaign AI script for Player 6 (Orange): OrangeAI_map01.ai
- this trigger to call on the stcript at the map start

  • OrangeAI attack
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
      • (Number of living Footman units owned by Player 6 (Orange)) Greater than or equal to 3
      • (Number of living Archer units owned by Player 6 (Orange)) Equal to 4
      • (Number of living Banneret Alaric units owned by Player 6 (Orange)) Equal to 1
      • (In-game time of day) Equal to 6.00
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • AI - Send Player 6 (Orange) the AI Command (0, 0)
        • Else - Actions
- this triggers aim is to send signal to the previous called script to proceed
JASS:
 call WaitForSignal()

I have also tried this trigger but it returns a syntax error
  • OrangeAI attack
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
      • (Number of living Footman units owned by Player 6 (Orange)) Greater than or equal to 3
      • (Number of living Archer units owned by Player 6 (Orange)) Equal to 4
      • (Number of living Banneret Alaric units owned by Player 6 (Orange)) Equal to 1
      • (In-game time of day) Equal to 6.00
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • Custom script: call CampaignAISetSignal(true)
        • Else - Actions
View attachment 476416

Any idea how to send signal to script to continue?
Could it be because of the condition "in game time equal to 6.00"?
From what I understand, this trigger will only activate once every 8 minutes (when the game time is exact 6.00), given that all other conditions are met.

I also recommend doing the following:
call SetBuildUnitEx(1,1,1,'hpea') //Peasant
call SetBuildUnitEx(1,1,1,'hbar') //Barracks
call SetBuildUnitEx(8,8,8,'hhou') //Farm
call SetBuildUnitEx(1,1,1,'hlum') //Lumbermill
call SetBuildUnitEx(1,1,1,'hwtw') //Scout Tower
call SetBuildUnitEx(1,1,1,'halt') //Altar
call SetBuildUnitEx(6,6,6,'hpea') //Peasant

Set only 1 peasant in the beginning, and then after all the buildings, set 6 peasants.
This will not tell the AI to have 7 peasants at once, it will still have 6.
Giving you the exact explanation behind the reason of this is a bit complicated but it basically it improves the AI workflow (so to say).
 
Level 4
Joined
Apr 21, 2016
Messages
31
Have you tried removing the if/then/else? You didn't specify a condition in there anyway so it's not useful, and perhaps the "then" actions never fire because of it

Otherwise, try tweaking/removing some or all conditions to see whether they would attack otherwise
  • OrangeAI attack
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of living Banneret Alaric units owned by Player 6 (Orange)) Equal to 1
          • (Number of living Footman units owned by Player 6 (Orange)) Greater than or equal to 3
          • (Number of living Archer units owned by Player 6 (Orange)) Equal to 4
        • Then - Actions
          • Custom script: call CampaignAISetSignal(true)
        • Else - Actions
I still get the Sytax error.

Could it be because of the condition "in game time equal to 6.00"?
From what I understand, this trigger will only activate once every 8 minutes (when the game time is exact 6.00), given that all other conditions are met.

I also recommend doing the following:
call SetBuildUnitEx(1,1,1,'hpea') //Peasant
call SetBuildUnitEx(1,1,1,'hbar') //Barracks
call SetBuildUnitEx(8,8,8,'hhou') //Farm
call SetBuildUnitEx(1,1,1,'hlum') //Lumbermill
call SetBuildUnitEx(1,1,1,'hwtw') //Scout Tower
call SetBuildUnitEx(1,1,1,'halt') //Altar
call SetBuildUnitEx(6,6,6,'hpea') //Peasant

Set only 1 peasant in the beginning, and then after all the buildings, set 6 peasants.
This will not tell the AI to have 7 peasants at once, it will still have 6.
Giving you the exact explanation behind the reason of this is a bit complicated but it basically it improved the AI workflow (so to say).
I removed the time requirement for test but syntax error is connected to command above. I also wish for the waves to be sent every 8min if able.
 
Level 28
Joined
Dec 3, 2020
Messages
968
  • OrangeAI attack
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of living Banneret Alaric units owned by Player 6 (Orange)) Equal to 1
          • (Number of living Footman units owned by Player 6 (Orange)) Greater than or equal to 3
          • (Number of living Archer units owned by Player 6 (Orange)) Equal to 4
        • Then - Actions
          • Custom script: call CampaignAISetSignal(true)
        • Else - Actions
I still get the Sytax error.


I removed the time requirement for test but syntax error is connected to command above. I also wish for the waves to be sent every 8min if able.
I see.
First: I suggest removing all of those weird conditions.
Second: if you want to attack waves to be sent every 8 minutes, do the following (since you want the call WaitForSignal() before each attack):
Event: Every 420 seconds of game time:
Action: Send Player 6 (Orange) the AI Command(0, 0)


And put CallWaitForSignal() before every attack wave and put the time to 1 minute (60 sec) on the attack time thingy.
Like this:
call WaitForSignal() // generally you need this only before the first wave only and then call the AI Command(0, 0), BUT in your case you need this before every "call InitAssaultGroup()" since you will call that commend forever every 420 seconds.
call InitAssaultGroup()
call CampaignAttackerEx( 7,7,7, GHOUL ) // (replace ghoul with your unit-type of preference)
call CampaignAttackerEx( 2,2,2, NECRO ) // (same as ghoul)
call SuicideOnPlayerEx(M1,M1,M1,user) // (the player that you need to be attacked)

----------
Your attack waves need to look like this (above), not like the ones you have (I just noticed that you messed that up)
call InitAssaultGroup() // (this is your script which is bad)
call CampaignAttackerEx(3,3,3,Footman)
call CampaignAttackerEx(2,2,2,Archer)

---------
The M1 means 1 minute until the attack wave is sent from the moment of the InitAssaultGroup() activating.

PS: HUGE advice from me:
it will take you some time to get used to the AI scripts. If you are new to that, I suggest simply copying the AI scripts from the official campaigns and editing them to your liking.
 
Last edited:
Level 4
Joined
Apr 21, 2016
Messages
31
Update
Works like a charm for the Human AI! :thumbs_up:

Here is the working script and triggers:
JASS:
//============================================================================
//  Collecting the Scraps 01 -- Orange AI Script
//============================================================================
globals
    player Reginald_Forces = PlayerEx(6) //player 6 Orange
    player Marauding_Orcs = PlayerEx(13) //player 13 Maroon
        
    constant integer Footman = 'hfoo'
    constant integer Peasant = 'hpea'
    constant integer Archer = 'e600'
    constant integer Hero = 'H601'
       
endglobals

function main takes nothing returns nothing
    call CampaignAI('hhou',null) //Farm 

    call SetReplacements(2,3,4)
    call GroupTimedLife(true)
    call SetPeonsRepair(true)
    call SetSlowChopping(false)
    set campaign_wood_peons = 2
    set campaign_gold_peons = 4   

    //Building Strategy
    //Tier 1
    //Build order
//    call SetBuildUnitEx(3,3,3,'hfoo') //Footman
//    call SetBuildUnitEx(1,1,1,'hpea') //Peasant
//    call SetBuildUnitEx(1,1,1,'hbar') //Barracks
//    call SetBuildUnitEx(8,8,8,'hhou') //Farm
//    call SetBuildUnitEx(1,1,1,'hlum') //Lumbermill
//    call SetBuildUnitEx(1,1,1,'hwtw') //Scout Tower
//    call SetBuildUnitEx(1,1,1,'halt') //Altar
//    call SetBuildUnitEx(6,6,6,'hpea') //Peasant total number
    
    //Defender Units
    call CampaignDefenderEx(1,1,1,Hero)
    call CampaignDefenderEx(3,3,3,Footman)

    call WaitForSignal()
    //Attack Waves 
  
    loop
    
        //*** WAVE 1 ***
        call InitAssaultGroup()
        call CampaignAttackerEx(5,5,5,Footman)
        call SuicideOnPlayerEx(M1,M1,M1,Marauding_Orcs)    //M1 means 1 minute since initiation of the command, M2 means 2min and so on    
         
        //*** WAVE 2 ***
        call WaitForSignal()
        call InitAssaultGroup()
        call CampaignAttackerEx(3,3,3,Footman)
        call CampaignAttackerEx(2,2,2,Archer)
        call SuicideOnPlayerEx(M2,M2,M2,Marauding_Orcs)
                   
        //*** WAVE 3 ***
        call WaitForSignal()
        call InitAssaultGroup()
        call CampaignAttackerEx(4,4,4,Footman)
        call CampaignAttackerEx(2,2,2,Archer)
        call CampaignAttackerEx(1,1,1,Hero)
        call SuicideOnPlayerEx(M3,M3,M3,Marauding_Orcs) 
        call WaitForSignal()
        
    endloop
endfunction
  • StartScript
    • Events
      • Map initialization
    • Conditions
    • Actions
      • AI - Start campaign AI script for Player 6 (Orange): OrangeAI_map01.ai
  • AI attack
    • Events
      • Time - Every 10.00 seconds of game time
    • Conditions
    • Actions
      • AI - Send Player 6 (Orange) the AI Command (0, 0)

New issue.

When I apply same scripting and trigger onto Maroon player, aka Orc, it doesn't work.
JASS:
//============================================================================
//  Collecting the Scraps 01 -- Maroon AI Script
//============================================================================
globals
    player Reginald_Forces = PlayerEx(6) //player 6 Orange
    player Marauding_Orcs = PlayerEx(13) //player 13 Maroon

    constant integer Grunt = 'ogru'
    constant integer Spearthrower = 'ohun'
    constant integer Peon = 'opeo'
    constant integer Hero = 'O600'
        
endglobals

function main takes nothing returns nothing
    call CampaignAI('otrb',null) //Burrow 
    
    call SetReplacements(2,3,4)
    call GroupTimedLife(true)
    call SetPeonsRepair(true)
    call SetSlowChopping(false)
    set campaign_wood_peons = 2
    set campaign_gold_peons = 4 
       
    //Building Strategy
    //Tier 1
    //Build order
    call SetBuildUnitEx(3,3,3,'ogru') //Grunt
    call SetBuildUnitEx(1,1,1,'opeo') //Peon
    call SetBuildUnitEx(1,1,1,'obar') //Barracks
    call SetBuildUnitEx(8,8,8,'otrb') //Burrow
    call SetBuildUnitEx(1,1,1,'ofor') //Warmill
    call SetBuildUnitEx(1,1,1,'owtw') //Watch Tower
    call SetBuildUnitEx(1,1,1,'oalt') //Altar
    call SetBuildUnitEx(6,6,6,'opeo') //Peon total number

    //Defender Units
    call CampaignDefenderEx(1,1,1,Hero)
    call CampaignDefenderEx(3,3,3,Grunt)
    
    call WaitForSignal()
    //Attack Waves 
  
    loop
    
        //*** WAVE 1 ***
        call InitAssaultGroup()
        call CampaignAttackerEx(3,3,3,Grunt)
        call SuicideOnPlayerEx(M1,M1,M1,Reginald_Forces)
        
        //*** WAVE 2 ***
        call WaitForSignal()
        call InitAssaultGroup()
        call CampaignAttackerEx(3,3,3,Grunt)
        call CampaignAttackerEx(2,2,2,Spearthrower)
        call SuicideOnPlayerEx(M1,M1,M1,Reginald_Forces)         
               
        //*** WAVE 3 ***
        call WaitForSignal()
        call InitAssaultGroup()
        call CampaignAttackerEx(3,3,3,Grunt)
        call CampaignAttackerEx(2,2,2,Spearthrower)
        call CampaignAttackerEx(1,1,1,Hero)
        call SuicideOnPlayerEx(M1,M1,M1,Reginald_Forces)
        call WaitForSignal()
        
    endloop
endfunction
  • StartScript Maroon
    • Events
      • Map initialization
    • Conditions
    • Actions
      • AI - Start campaign AI script for Player 13 (Maroon): MaroonAI_map01.ai
  • AI attack Maroon
    • Events
      • Time - Every 10.00 seconds of game time
    • Conditions
    • Actions
      • AI - Send Player 13 (Maroon) the AI Command (0, 0)
1718824416220.png
 
Level 4
Joined
Apr 21, 2016
Messages
31
Barracks are preplaced, as well as trigger that gives all AI players 1750gold and 750lumber. They also have enough food. Both human and orc bases are all set up. AI only needs to do units. Thought it has to be there so AI would rebuild building but that is not the case. You are correct. When building order was removed all is working!

Off to learn how to make a cutscene. Will update as I move forward!
 
Last edited:
Top