DModelPanel/RunAnimation

From Garry's Mod
Jump to: navigation, search
 DModelPanel:RunAnimation( )

DescriptionPanelFunc

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

Examples

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


Personal tools
Navigation