Statistics: Posted by Dudekahedron — 17 Oct 2016, 21:19
Statistics: Posted by Exotic_Retard — 17 Oct 2016, 21:00
Statistics: Posted by Uveso — 17 Oct 2016, 19:35
Statistics: Posted by Dudekahedron — 17 Oct 2016, 17:35
Statistics: Posted by Uveso — 17 Oct 2016, 04:45
'/mods/'
Statistics: Posted by Dudekahedron — 17 Oct 2016, 04:32
AnimationActivate = '/mods/YOURMODNAME/units/xxx0000/xxx0000_AActivate.sca',
Statistics: Posted by Uveso — 17 Oct 2016, 04:26
OnStartBeingBuilt = function(self, builder, layer)
CStructureUnit.OnStartBeingBuilt(self, builder, layer)
if not self.AnimationManipulator then
self.AnimationManipulator = CreateAnimator(self)
self.Trash:Add(self.AnimationManipulator)
end
self.AnimationManipulator:PlayAnim(self:GetBlueprint().Display.AnimationActivate, false):SetRate(0)
end,
OnStopBeingBuilt = function(self,builder,layer)
CStructureUnit.OnStopBeingBuilt(self,builder,layer)
if self.AnimationManipulator then
self:SetUnSelectable(true)
self.AnimationManipulator:SetRate(1)
self:ForkThread(function()
WaitSeconds(self.AnimationManipulator:GetAnimationDuration()*self.AnimationManipulator:GetRate())
self:SetUnSelectable(false)
self.AnimationManipulator:Destroy()
end)
end
end,
Statistics: Posted by Dudekahedron — 17 Oct 2016, 02:53