• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[AI] GetExpansionPeon always returns null

Status
Not open for further replies.
Level 29
Joined
Feb 2, 2006
Messages
1,692
Hi,
I want my AI scripts to build expansions.
However, the native
JASS:
GetExpansionPeon
always returns null, so nothing is build. Here it states: AI Manual

"This native will return the peon unit that will start a new expansion for the AI player, however, it will return null if there is no gold mine (excluding a gold mine the AI player already own) found on the map."

I have many gold mines in my map but they are a bit further away from the base and only connected via waygates. Is this some issue for the AI?
Does anyone know how to fix this?
 
I think the waygates are likely your problem or at least worth ruling out. I would offer to help, but I don't know AI scripts well enough to mess around and find out.

I imagine when a computer uses a waygate normally, it is because they have given an order and the pathing system finds the shortcut.

You could try revealing the map to computers at the start, but I wonder if they would try to move to a location that there was no path to...

Maybe you could connect the unconnected regions with obnoxiously long foot paths?

I'd rule out the waygates though first and foremost.


Edit: Are you using black mask boundaries between areas, or only path blockers?
 
Status
Not open for further replies.
Back
Top