Player.GetRagdollEntity

From GMod Wiki

Jump to: navigation, search
Function
Syntax Entity:GetRagdollEntity( )
Description:
Returns the ragdoll entity of a (dead or not if you used Player.CreateRagdoll()) player
Returns: Entity
In Object: Entity
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Player.GetRagdollEntity]Player.GetRagdollEntity [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionWhen run, if the player is dead it will throw their ragdoll up in the air.
Used onNewerShared.png
Code
if not LocalPlayer():Alive() and ValidEntity( LocalPlayer():GetRagdollEntity() ) then
 
	  local ent = LocalPlayer():GetRagdollEntity()
	  local head = ent:GetPhysicsObjectNum( 10 )
	  head:ApplyForceCenter( Vector(0,0,6000) )
end
OutputN/A


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox