Congrats! I trying to make normal working npc and discovered wierd function bug. I want to make npc walk instead of run when he not raged and use this part of code:
if(self.HeadHealth>=1&&(self.BurnTime<self.BurnTimeToPanic||self.BurnTime>self.BurnTimeToPanic+3)&& self:Health()>self:GetMaxHealth()*0.7) then if(self:GetMovementActivity()==ACT_RUN) then self:SetMovementActivity(ACT_WALK) end end
I think you understand that main function here self:SetMovementActivity(ACT_WALK), but it have problem. Frame count in running animation much smaller than in walking animation and running animation play faster (40 fps). In result ACT_WALK plays with ACT_RUN duration and it’s look like this:
Dat animation always restarts and all this looks bad. Question: can i change movement animation without SetMovementActivity?