This is an old revision of the document!
⇐ Index
Available in version 1.3 and later.
SetUnitBuildWare(<-unit <-unitBuildWare)
DO NOT apply this every frame when having a constructing unit swap construction ware types! This causes (effectively) a 2nd construction to occur for the same unit.
It also causes game simulation oddities.
You MUST surround this API with once endonce.
Sets the build ware type of the unit. 0 = energy, 1 = anticreeper, 2 = arg, 3 = liftic.
SetUnitBuildWare(self 1)
if(GetUnitConstructing(self)) #--Custom construction: GetUnitConstructingData(self) ->curBuild if(<-curBuild.0 gt(300)) if(<-curBuild.0 gt(350)) once SetUnitBuildWare(self 3) endonce else once SetUnitBuildWare(self 2) endonce endif else once SetUnitBuildWare(self 0) endonce endif return endif
⇐ Index