You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when send call IssueImmediateOrder(u, "stop") or call IssuePointOrderById(u, old_id[racial_expansion], x, y)
need to avoid conflicts in zeppelin control -- check IsUnitLoaded(u)
if GetUnitCurrentOrder(u) == old_id[racial_expansion] or IsUnitLoaded(u) then
...
call TQAddUnit2Job(RMax(d / 200 , 3), BUILD_EXPANSION, 0, u, expansion)
Because BuildMovePeonZeppelin(expansion_peon, current_expansion, w) is not a percentage guarantee for unLoaded, you may notice that sometimes it is uninstalled, but peon will go back and Loaded zeppelin again
The following code can effectively avoid this situation
At the same time, there is also a fallback setting to prevent StartExpansionAM from being unable to recover zeppelin after exiting prematurely due to other circumstances
if (w or f) and TownCountDone(neutral_zeppelin) > 0 then
if build_zeppelin == null or not UnitAlive(build_zeppelin) then
if build_zeppelin != null then
call GroupRemoveUnit(unit_zepplin_move, build_zeppelin)
endif
set build_zeppelin = GetUnusedZeppelinNearUnit(build_zeppelin, expansion_peon)
if build_zeppelin == null then
call Trace("AMAIStartexpa: No Zeppelin found for transporting peon")
else
call GroupAddUnit(unit_zepplin_move, build_zeppelin)
call RemoveGuardPosition(build_zeppelin)
call TQAddUnitJob(GetTimeToReachUnit(build_zeppelin, current_expansion) + GetTimeToReachUnit(build_zeppelin, expansion_peon) + 30, RESET_GUARD_POSITION, 50, build_zeppelin) // Prevent failure and failure to recover midway
endif
endif
if (w and build_zeppelin == null) then
call Trace("AMAIStartexpa: Water expansion required waiting to create a zeppelin")
return BUILT_SOME
endif
if build_zeppelin != null then
if not BuildMovePeonZeppelin(expansion_peon, current_expansion, w) then
call Trace("AMAIStartexpa: Expanding via a zeppelin")
return BUILT_SOME
endif
call RemoveGuardPosition(expansion_peon) //Prevent being controll away from mine
call TQAddUnitJob(2, RESET_GUARD_POSITION, 50, expansion_peon)
call IssuePointOrder(expansion_peon, "move", GetUnitX(current_expansion), GetUnitY(current_expansion))
endif
endif
The text was updated successfully, but these errors were encountered:
when send
call IssueImmediateOrder(u, "stop")
orcall IssuePointOrderById(u, old_id[racial_expansion], x, y)
need to avoid conflicts in zeppelin control -- check IsUnitLoaded(u)
Because
BuildMovePeonZeppelin(expansion_peon, current_expansion, w)
is not a percentage guarantee for unLoaded, you may notice that sometimes it is uninstalled, but peon will go back and Loaded zeppelin againThe following code can effectively avoid this situation
At the same time, there is also a fallback setting to prevent
StartExpansionAM
from being unable to recover zeppelin after exiting prematurely due to other circumstancesThe text was updated successfully, but these errors were encountered: