Entity.PhysicsInit

From GMod Wiki

Revision as of 08:20, 11 October 2010 by Jcw87 (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax Entity:PhysicsInit( Enum SolidType )
Description:
In a scripted entity's initialization event, this function will give the entity the physics model of the model it was set to use with Entity:SetModel. This takes one argument, a solidtype enum. Usually, solidtype should be SOLID_VPHYSICS.
Returns: nil
In Object: Entity
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.PhysicsInit]Entity.PhysicsInit [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionSets the entity's initial physics to SOLID_VPHYSICS.
Used onNewerShared.png
Code
self:PhysicsInit( SOLID_VPHYSICS )
OutputN/A


Additional Notes

SHARED | 0000000000000000 | 00000000000000000 | SOLID_NONE
SHARED | 0000000000000001 | 00000000000000001 | SOLID_BSP
SHARED | 0000000000000002 | 00000000000000010 | SOLID_BBOX
SHARED | 0000000000000003 | 00000000000000011 | SOLID_OBB
SHARED | 0000000000000004 | 00000000000000100 | SOLID_OBB_YAW
SHARED | 0000000000000005 | 00000000000000101 | SOLID_CUSTOM
SHARED | 0000000000000006 | 00000000000000110 | SOLID_VPHYSICS

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox