ENTITY/GravGunPunt

From Garry's Mod
Jump to: navigation, search
 ENTITY:GravGunPunt( )

Contents

Description

Called when this entity is about to be punted with the gravity gun (primary fire).

Only works in Sandbox derived gamemodes and only if GM:GravGunPunt is not overridden.

Arguments

Player ply

The player pressing left-click with the gravity gun at an entity

Returns

boolean

Return true or false to enable or disable punting respectively.

Examples

Example

Enables a scripted entity to be punted even when frozen.

function ENT:GravGunPunt( ply )
	self:GetPhysicsObject():EnableMotion( true )
	return true
end


Personal tools
Navigation