• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[AI] AI Problem.

Status
Not open for further replies.
Level 3
Joined
Oct 12, 2004
Messages
66
Hey guys, I've been using this AI script for a map i'm making however the problem is that I can't seem to make it attack 2 players instead of only 1. I'm still basic on this though, I've used the scripts from this tutorial as base ( http://hiveworkshop.com/forums/showthread.php?t=28807 , thank you Moyack, and yes I know its old. )
And my Script is this (haven't posted defense/building stuff)
(I want it to Attack Player 4 (purple) And Player 2 (blue))

JASS:
globals
    player MyVictim = Player ( 2 )
    player Sylv = Player ( 4 )
endglobals

//Building Hero Def etc script

// Wave 1
    call InitAssaultGroup()
    call CampaignAttackerEx( 6, 6, 6, CRYPT_FIEND )
    call CampaignAttackerEx( 2, 2, 2, MEAT_WAGON )
    call CampaignAttackerEx( 1, 1, 1, CRYPT_LORD )
    call SuicideOnPlayerEx( M2, M2, M2, Sylv )    
    // Wave 2
    call InitAssaultGroup()
    call CampaignAttackerEx( 5, 5, 5, CRYPT_FIEND )
    call CampaignAttackerEx( 5, 5, 5, ABOMINATION )
    call CampaignAttackerEx( 1, 1, 1, CRYPT_LORD )
    call SuicideOnPlayerEx( M3, M3, M3, MyVictim )
    loop
        // Wave 3
        call InitAssaultGroup()
        call CampaignAttackerEx( 4, 4, 4, ABOMINATION )
        call CampaignAttackerEx( 2, 2, 3, OBSIDIAN_STATUE )
        call CampaignAttackerEx( 1, 1, 1, CRYPT_LORD )
        call SuicideOnPlayerEx( M5, M5, M5, Sylv )
        // Wave 4
        call InitAssaultGroup()
        call CampaignAttackerEx( 3, 3, 3, CRYPT_FIEND )
        call CampaignAttackerEx( 2, 2, 2, ABOMINATION )
        call CampaignAttackerEx( 1, 1, 1, CRYPT_LORD )
        call CampaignAttackerEx( 1, 1, 2, MEAT_WAGON )
        call SuicideOnPlayerEx( M5, M5, M5, MyVictim )
        // Wave 4
        call InitAssaultGroup()
        call CampaignAttackerEx( 8, 8, 8, ABOMINATION )
        call CampaignAttackerEx( 1, 1, 1, CRYPT_LORD )
        call SuicideOnPlayerEx( M5, M5, M5, Sylv )
        // Wave 4
        call InitAssaultGroup()
        call CampaignAttackerEx( 3, 3, 3, NECRO )
        call CampaignAttackerEx( 2, 2, 2, OBSIDIAN_STATUE )
        call CampaignAttackerEx( 1, 1, 1, CRYPT_LORD )
        call CampaignAttackerEx( 2, 2, 2, CRYPT_FIEND )
        call SuicideOnPlayerEx( M5, M5, M5, MyVictim )
        // Wave 4
        call InitAssaultGroup()
        call CampaignAttackerEx( 3, 3, 3, NECRO )
        call CampaignAttackerEx( 2, 2, 2, OBSIDIAN_STATUE )
        call CampaignAttackerEx( 1, 1, 1, CRYPT_LORD )
        call CampaignAttackerEx( 2, 2, 2, CRYPT_FIEND )
        call SuicideOnPlayerEx( M5, M5, M5, Sylv )
        // Wave 4
        call InitAssaultGroup()
        call CampaignAttackerEx( 10, 10, 10, CRYPT_FIEND )
        call CampaignAttackerEx( 1, 1, 1, CRYPT_LORD )
        call SuicideOnPlayerEx( M5, M5, M5, MyVictim )
    endloop
endfunction

When I test the AI it only attacks Player 2... could use some help, and would be appreciated :) Thanks.
 
Last edited by a moderator:
Status
Not open for further replies.
Top