ENTITY:ImpactTrace
Description
Called when a bullet trace hits this entity and allows you to override the default behavior by returning true.
Arguments
3 string customImpactName = "nil"
The effect name to override the impact effect with.
Possible arguments are ImpactJeep, AirboatGunImpact, HelicopterImpact, ImpactGunship.
Returns
Example
Hides the original bullet impact effect and dispatches explosions instead.
function ENT:ImpactTrace(trace,dmgtype,customimpactname)
local effectdata = EffectData()
effectdata:SetOrigin( trace.HitPos )
util.Effect( "Explosion", effectdata )
return true
end