Garry's Mod Wiki

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

Page Links


Special Pages


Wikis

?

Render Time: 23ms

Session 0
DB GetPage 3
Generate Html 1
SaveChanges 10
Render Body 0
Render Sidebar 6