GM:CreateClientsideRagdoll

From Garry's Mod
Jump to: navigation, search
 GM:CreateClientsideRagdoll( )

Contents

Description

Called whenever an entity becomes a clientside ragdoll.

NOTE Currently this will not be called for player death ragdolls created using Player:CreateRagdoll.

Arguments

Entity entity

The Entity that created the ragdoll

Arguments

Entity ragdoll

The ragdoll being created.

Examples

Example

A way of fade out a ragdoll easily. Idea from here.

hook.Add( "CreateClientsideRagdoll", "fade_out_corpses", function( entity, ragdoll )

	ragdoll:SetSaveValue( "m_bFadingOut", true ) -- Set the magic internal variable that will cause the ragdoll to immediately start fading out

end )


Personal tools
Navigation