[lua]
function ENT:Initialize()
self.Entity:SetModel( "models/Combine_Helicopter/helicopter_bomb01.mdl" )
self.Entity:PhysicsInit( SOLID_VPHYSICS )
self.Entity:SetMoveType( MOVETYPE_VPHYSICS )
self.Entity:SetSolid( SOLID_VPHYSICS )
local phys = self.Entity:GetPhysicsObject()
if (phys:IsValid()) then
phys:Wake()
end
phys:SetMass( 2000000000 )
end
function ENT:PhysicsCollide( data, physobj )
local explode = ents.Create("env_explosion")
explode:SetPos(self:GetPos())
explode:Spawn()
explode:SetKeyValue("iMagnitude", "220")
explode:Fire("Explode", 0, 0)
end[/lua]
Whenever it collides with a player the resulting explosion does kill people but if it just collides with the map the explosion does not kill anyone, and a player just touching it when it is on the ground will also make a non-harmful explosion, Anyone know how to fix this?
EDIT: This is in the entities init.lua file
You should use[URL="http://wiki.garrysmod.com/?title=Util.BlastDamage"] Util.BlastDamage()[/URL] and [URL="http://wiki.garrysmod.com/?title=Util.Effect"]Util.Effect()[/URL]
Sorry, you need to Log In to post a reply to this thread.