HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Poor AI execution?

11-15-2006, 05:40 AM#1
Sardius
I am STILL having random problems with AI, I use campaign based attack waves and scripts... Like this.

Collapse JASS:
  //*** WAVE 3 ***
    call InitAssaultGroup()
    call CampaignAttackerEx( 3,3,3, RAIDER            )
    call CampaignAttackerEx( 3,3,3, CATAPULT    )
    call CampaignAttackerEx( 3,3,3, WYVERN    )
    call CampaignAttackerEx( 2,2,2, SAPPER            )
    call SuicideOnPlayerEx(M2,M2,M2,user) 

And I've read the campaign tutorial... But there are two issues that randomly occur very frequently.

For example in this attack wave above, the sapper's almost NEVER come, the enemy base CAN build them, I've seen to that and I do see them occasionally build and send sappers... But its rare, in the above attack wave, maybe 20% of the time do they build and send the sappers... 80% of the time they don't even build them. It makes little sense to me because they always have more then enough food, gold and lumber.

The other issue is a force abandoning their attack, its common when I send only flyers. For example, a group of wyverns come and attack your gold outpost or an ally structure and destroy it, then return to their base without completeing the attack wave... And then they're sent along with the next attack wave and it utterly devestates you.
11-15-2006, 06:01 AM#2
Av3n
You might want to send the whole AI sricpt to moyack, it is porpaly something wrong with your srcipt.

-Av3n
11-15-2006, 11:59 AM#3
moyack
Just some questions :)

Which building trains Sappers??
How many buildings do you have to train Sappers??
Which other units are trained by the building who trains Sappers??
11-21-2006, 11:58 PM#4
Sardius
Orc Barracks train sappers and they have 3 barracks. Even when running with warpten the problem still occurs.

So in that attack wave the only other units they are building are the catapults... Yet 80% of the time you only see the catapults and wyverns and they don't even build the sappers... But rarely they do and their are some attack waves where sappers always come...
11-22-2006, 12:25 AM#5
moyack
Hmm, quite strange.

Well, I propose this script, tell me if it works:

Collapse JASS:
    //*** WAVE 3 ***
    call InitAssaultGroup()
    call CampaignAttackerEx( 3,3,3, RAIDER )
    call CampaignAttackerEx( 3,3,3, CATAPULT )
    call CampaignAttackerEx( 3,3,3, WYVERN )
    call CampaignAttackerEx( 2,2,2, SAPPER )
    loop
        exitwhen GetUnitCountDone( SAPPER ) >= 2
        call Sleep(2)
    endloop
    call SuicideOnPlayerEx(0,0,0,user)

In this way, the assault group won't attack until it has two or more sappers avaliable for battle.
11-22-2006, 02:52 AM#6
Sardius
Is there any solution to the problem with an attack wave being recalled to their base? Like say if I have a gold outpost or an ally building and the computer comes and destorys it, they always return to their base rather then pressing out, which ends up returning with the next attack wave with an overwhelming force.