Garry's Mod Wiki

Garry's Mod Wiki

  number Entity:GetPhysicsObjectCount()

Description

Returns the number of physics objects an entity has (usually 1 for non-ragdolls)

Returns

1 number
numObjects

Example

Finds all the Physics Objects in a ragdoll and applies an upward force

for i=0, ragdoll:GetPhysicsObjectCount() - 1 do -- "ragdoll" being a ragdoll entity local phys = ragdoll:GetPhysicsObjectNum(i) phys:ApplyForceCenter( Vector( 0, 0, 10000 ) ) end

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...