wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Warcraft III Modding > Developer's Corner > General Development
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 02-26-2016, 07:19 PM   #1
Tallanar
User
 
Join Date: Apr 2014
Posts: 6

Tallanar has little to show at this moment (0)

Default Campaign AI Not working

I'm trying to write my custom Campaign AI, but current I wrote does not work, could someone look into code and show me where did I make mistake?

HTML Code:
globals player Target = Player(3) //Purple Player endglobals function ConfigAI takes nothing returns nothing SetTargetHeroes(true) SetUnitsFlee(false) SetHeroesFlee(false) SetGroupsFlee(false) SetSlowChopping(true) SetPeonsRepair(true) SetHeroesBuyItems(false) SetHeroesTakeItems(false) endfunction function main takes nothing returns nothing call ConfigAI() call CampaignAI(HOUSE, null) call SetBuildUnit(1, HUMAN_ALTAR) call SetBuildUnit(1, BARRACKS) call SetBuildUnit(3, FOOTMAN) call SetBuildUnit(4, HOUSE) call WaitForSignal() loop call InitAssaultGroup() call CampaignAttackerEx(2,2,2, FOOTMAN) call CampaignAttackerEx(1,1,1, PALADIN) call SuicideOnPlayerEx(M5, M4, M2, Target) endloop endfunction

Farms and other buildings are on map

Last edited by Tallanar : 02-26-2016 at 08:23 PM.
Tallanar is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 02-27-2016, 01:38 PM   #2
moyack
Evil Emoticon
 
moyack's Avatar


Respected User
Project Leader: PoC
 
Join Date: Jan 2006
Posts: 3,279

Submissions (17)

moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)

AI Tournament #2 - 2nd PlaceHero Contest - Second place

Send a message via MSN to moyack
Default

you can check this tutorial of mine about how to implement a campaign AI:

http://blizzardmodding.info/4238/how...a-campaign-ai/
moyack is offline   Reply With Quote
Old 02-29-2016, 01:52 PM   #3
Tallanar
User
 
Join Date: Apr 2014
Posts: 6

Tallanar has little to show at this moment (0)

Default

I made it with your tutorial and it didn't work, but I found where did I make mistake.
I forgot to set starting resources for player.

Last edited by Tallanar : 02-29-2016 at 02:45 PM.
Tallanar is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 08:40 AM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services