PhysObj.Sleep

From GMod Wiki

Revision as of 18:57, 29 October 2009 by Crazy Quebecer (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax PhysObj:Sleep( )
Description:
Sets the physical object to sleep. If a physical object is asleep, it has no velocity, but can be awoken with force.
Returns: nil
In Object: Physobj
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=PhysObj.Sleep]PhysObj.Sleep [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionSets physical object that player is look at to sleep.
Used onNewerShared.png
Code
tr = player1.GetEyeTrace()
if (tr.HitNonWorld) then
ent1 = tr.Entity
phys1 = ent1:GetPhysicsObject()
phys1:Sleep()
end
OutputN/A
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox