Garry's Mod Wiki

DModelPanel:RunAnimation

  DModelPanel:RunAnimation()

Description

This function is used in DModelPanel:LayoutEntity. It will progress the animation, set using Entity:SetSequence. By default, it is the walking animation.

Example

Sets the model to alyx and puts her in a walking animation

local ModelPanel = vgui.Create( "DModelPanel", Panel ) ModelPanel:SetModel( "models/player/alyx.mdl" ) function ModelPanel:LayoutEntity( ent ) ModelPanel:RunAnimation() end