Page 1 of 1

question about const

Posted: 08 Oct 2013, 08:36
by Broker
Hi all!!

how can i understand that constructor builds building?

like this:

[code]
local bQueue = Spring.GetFullBuildQueue(unit)
if bQueue then const=true
[/code]


i try it but not working.

Re: question about const

Posted: 08 Oct 2013, 19:59
by zwzsg
Personnaly I used to use something like that:

Code: Select all

local vx,_,vz=Spring.GetUnitVelocity(u)
if vx==0 and vz==0 and not Spring.GetUnitIsBuilding(u) then
-- idle
The Spring.GetUnitIsBuilding tells me if it is currently using its nanolathe.
The Velocity tells me it is going somewhere, so maybe on its way to the build zone.
However, latest Spring version broke it: Unit getting stuck no longer have a null speed.