• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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