Garry's Mod Wiki


Entity:FrameAdvance( number interval )


Advances the cycle of an animated entity.

Animations that loop will automatically reset the cycle so you don't have to - ones that do not will stop animating once you reach the end of their sequence.


1 number interval
How many seconds to advance the cycle. Set to 0 to let the engine calculate this for you based on CurTime.


From DModelPanel

function PANEL:RunAnimation() self.Entity:FrameAdvance( (RealTime()-self.LastPaint) * self.m_fAnimSpeed ) end
Output: Animates the entity

Page Links

Special Pages



Render Time: 28ms

DB GetPage 3
Generate Html 2
SaveChanges (1) 8
Render Body 0
Render Sidebar 12