- Joined
- Mar 16, 2008
- Messages
- 955
This was working previously. I didn't change anything (i think) now it just stops when it gets to this part. Attacking function still works. I double checked tech requirements, that the workers can build lumber mills. Not sure what's preventing it from building a lumber mill... any ideas?
EDIT: so the -1 effectively means "any base". so when a lumber mill is -1 OUTSIDE of the condition, then it builds one, but INSIDE the condition then it doesn't. So something must be wrong with the condition???
UPDATE: IT SEEMS SOMEONE CHANGED THE WAY TOWNS ARE INDEXED
EDIT: so the -1 effectively means "any base". so when a lumber mill is -1 OUTSIDE of the condition, then it builds one, but INSIDE the condition then it doesn't. So something must be wrong with the condition???
UPDATE: IT SEEMS SOMEONE CHANGED THE WAY TOWNS ARE INDEXED

JASS:
function UpdateConditions takes nothing returns nothing
...
set gCond_Need_LM = ( ( GetUnitCount( LUMBER_MILL ) ) < 1 )
...
endfunction
function BuildPriorities takes nothing returns nothing
...
/// Build Lumbermill
if gCond_Need_LM then
if TownHasHall(1) then
call SetBuildAll( BUILD_UNIT, 1, LUMBER_MILL, 1 )
elseif TownHasHall(2) then
call SetBuildAll( BUILD_UNIT, 1, LUMBER_MILL, 2 )
else
call SetBuildAll( BUILD_UNIT, 1, LUMBER_MILL, -1 )
endif
endif
...
endfunction
Attachments
Last edited: