Garry's Mod Wiki

Entity:FrameAdvance

Entity:FrameAdvance( number interval )

Description

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.

Arguments

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

Example

From DModelPanel

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

Page Links


Special Pages


Wikis

?

Render Time: 33ms

DB GetPage 2
Generate Html 7
SaveChanges (1) 9
Render Body 0
Render Sidebar 12