From Garry's Mod
Called every tick for every entity being "touched".
|WARNING||This only works for brush entities and for entities that have Entity:SetTrigger set to true.|
|NOTE||For physics enabled entities, this hook will not be ran while the entity's physics is asleep. See PhysObj:Wake.|
The entity that touched it.
function ENTITY:Touch(entity) self:EmitSound("ambient/explosions/explode_" .. math.random(1, 9) .. ".wav") self:Remove() end