• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

My AI just stands at its base and does nothing

Level 2
Joined
Apr 13, 2024
Messages
4
Hello everyone! I wanna make a SP map for just only me (playing with bots). Problem is with bots (i pin map). They just stand at their base and do nothing. I tried placing wards everywhere and applying the visible modifier, but it didn't have any effect. The result only happens when one bot's farm sees another bot's farm, and only then do they send troops there. Please help. :cry:
 

Attachments

your AI is stuck at target priority #1 - it never finds enemy base
JASS:
// Target Priority #1
if (target == null) then
    set target = GetEnemyExpansion()
    if (target == null) then
        call StartGetEnemyBase(  )
        loop
            exitwhen (not WaitGetEnemyBase()) // <-- this is never true, so loop never exits
            call SuicideSleep( 1 )
        endloop
        set target = GetEnemyBase()
    endif
endif
I don't know how exactly AI evaluates what base is, but it seems that you need to give your base buildings the "Town Hall" unit classification. After I did that the AI eventually started attacking.
 
your AI is stuck at target priority #1 - it never finds enemy base
JASS:
// Target Priority #1
if (target == null) then
    set target = GetEnemyExpansion()
    if (target == null) then
        call StartGetEnemyBase(  )
        loop
            exitwhen (not WaitGetEnemyBase()) // <-- this is never true, so loop never exits
            call SuicideSleep( 1 )
        endloop
        set target = GetEnemyBase()
    endif
endif
I don't know how exactly AI evaluates what base is, but it seems that you need to give your base buildings the "Town Hall" unit classification. After I did that the AI eventually started attacking.
YOU BEST! 😊😊😊 THANK YOU!
 
Back
Top