Entity/BecomeRagdollOnClient

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

Contents

Description

Spawns a clientside ragdoll for the entity, positioning it in place of the original entity, and makes the entity invisible. It doesn't preserve flex values (face posing) as CSRagdolls don't support flex.

It does not work on players. Use Player:CreateRagdoll instead.

The original entity is not removed, and neither are any ragdolls previously generated with this function.

To make the entity re-appear, run Entity:SetNoDraw( false )

Returns

CSEnt

The created ragdoll.

Examples

Example

Spawns a ragdoll for all NPCs.

for k,npc in pairs( ents.FindByClass( "npc_*" ) ) do
    npc.RagDoll = npc:BecomeRagdollOnClient()
end


Personal tools
Navigation