hey, TH. how's going?
I found problem with your AutoFly here is an image
and here is my preload function
private function preloadUnits takes nothing returns nothing
local integer i = 0
loop
exitwhen i > SlotTotal
set PreloadTotal = PreloadTotal + 1
static if LIBRARY_WorldBounds then
set PreloadUnit.unit[PreloadTotal] = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), BUTTON_ID, WorldBounds.maxX, WorldBounds.maxY, 270.)
else
set PreloadUnit.unit[PreloadTotal] = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), BUTTON_ID, WorldMaxX, WorldMaxY, 270.)
endif
static if not LIBRARY_AutoFly then
if UnitAddAbility(PreloadUnit.unit[PreloadTotal], 'Amrf') and UnitRemoveAbility(PreloadUnit.unit[PreloadTotal], 'Amrf') then
endif
endif
call BJDebugMsg("preload-" + I2S(PreloadTotal) + "check")
call SetUnitFlyHeight(PreloadUnit.unit[PreloadTotal], LOCATION_Z + 5., 0)
call SetUnitVertexColor(PreloadUnit.unit[PreloadTotal], 255, 255, 255, 0)
set i = i + 1
endloop
endfunction
so, when I use your AutoFly, I can't modify the last-preloaded-unit's fly height, but when I disable AutoFly everything works normally.. I guess it's a problem with your indexer...
EDIT:
I always use dummy unit at PreloadTotal btw, so the problem is I can't modify the last-preloaded-unit's fly height.. thanks..