Entity/FrameAdvance

From Garry's Mod
Jump to: navigation, search
 Entity:FrameAdvance( )

Contents

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

number interval

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

Examples

Example

From DModelPanel

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

Output:

Animates the entity
Personal tools
Navigation