• Sequences not playing properly?
    0 replies, posted
When called as a client side script, it's supposed to create a massive seagull in 0,0,0 and make it repeatedly flap. However, all it seems to do is a feeble small flap every time ResetSequence is called. Can someone help me please? [lua]if ClientSeagull then hook.Remove("Think","GullAnims") ClientSeagull:Remove() end ClientSeagull=ents.Create("models/seagull.mdl", RENDERGROUP_OPAQUE) ClientSeagull:SetPos(vector_origin) ClientSeagull:SetModelScale(Vector(6,6,6)) ClientSeagull:Spawn() local s=ClientSeagull:LookupSequence("fly") ClientSeagull:ResetSequence(s) local LastAnimated=CurTime() hook.Add("Think","GullAnims",function() local AnimLength=ClientSeagull:SequenceDuration() if LastAnimated+AnimLength<CurTime() then ClientSeagull:ResetSequence(s) LastAnimated=CurTime() end end) [/lua]
Sorry, you need to Log In to post a reply to this thread.