Entity Help


AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua")

include('shared.lua')

function ENT:Initialize()

	self:SetModel("models/weapons/w_slam.mdl")
	self:PhysicsInit( SOLID_VPHYSICS )
	self:SetMoveType( MOVETYPE_VPHYSICS )
	self:SetSolid( SOLID_VPHYSICS )
	
end 

function ENT:Use( activator, caller)
	if ( activator:IsPlayer() ) then

		
		self:Ignite(igniteForSeconds,0)

        	local explosion = ents.Create( "env_explosion" ) 
        	explosion:SetKeyValue( "spawnflags", 144 ) 
        	explosion:SetKeyValue( "iMagnitude", 200 ) 
        	explosion:SetKeyValue( "iRadiusOverride", 300 ) 
        	explosion:SetPos(self:GetPos()) 
        	explosion:Spawn( ) 
        	explosion:Fire("Explode", 0, 0)      	
        	self.Entity:Remove() 

	end
end
function ENT:Think()

end

How do I made this so it can by stuck to a Dead body ?

what is it?

[lua]
self.Entity:Remove()
[/lua]

:v

[editline]28th February 2014[/editline]

A dumb attempt to a sticky bomb, only that this one can be attached to a body