Entity.SetMoveCollide

From GMod Wiki

Jump to: navigation, search
Function
Syntax Entity:SetMoveCollide( Integer movecollide )
Description:
Sets the Move Collide of the entity. The move collide is the way a physics object reacts to hitting an object - will it bounce, slide? Movecollide is an integer that corresponds to a Move Collide enumeration.
Returns: nil
In Object: Entity
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.SetMoveCollide]Entity.SetMoveCollide [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionCreates a pistol prop that bounces off surfaces.
Used onNewerServer.png
Code
 
ent = ents.Create( "prop_physics" )
  ent:SetModel( "models/Weapons/w_pistol.mdl" )
  ent:SetPos( self.Owner:GetShootPos() )
  ent:SetAngles( self.Owner:GetAngles() )
  ent:SetOwner( self.Owner )
  ent:Spawn( )
  ent:SetMoveCollide(MOVECOLLIDE_FLY_BOUNCE)
 
OutputN/A


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox