Garry's Mod Wiki

Revision Difference

Entity:FrameAdvance#518528

<function name="FrameAdvance" parent="Entity" type="classfunc"> <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. </description> <realm>Shared</realm> <args> <arg name="interval" type="number">How many seconds to advance the cycle. Set to 0 to let the engine calculate this for you based on &lt;page&gt;Global.CurTime&lt;/page&gt;.</arg> <arg name="interval" type="number">How many seconds to advance the cycle. Set to 0 to let the engine calculate this for you based on <page>Global.CurTime</page>.</arg> </args> </function> <example> <description>From DModelPanel</description> <code> function PANEL:RunAnimation() self.Entity:FrameAdvance( (RealTime()-self.LastPaint) * self.m_fAnimSpeed ) end </code> <output>Animates the entity</output> </example>