[AI] GetExpansionPeon always returns null

Status
Not open for further replies.
Level 29
Joined
Feb 2, 2006
Messages
1,691
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