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.
question about const
Moderator: Moderators
Re: question about const
Personnaly I used to use something like that: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.
Code: Select all
local vx,_,vz=Spring.GetUnitVelocity(u)
if vx==0 and vz==0 and not Spring.GetUnitIsBuilding(u) then
-- idle
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.