Garry's Mod Wiki

History for ENTITY:ImpactTrace

Revision Difference

ENTITY:ImpactTrace#519111

<function name="ImpactTrace" parent="ENTITY" type="hook"> <ishook>yes</ishook> <description>Called when a bullet trace hits this entity and allows you to override the default behavior by returning true.</description> <realm>Client</realm> <args> <arg name="traceResult" type="table">The trace that hit this entity as a <page>TraceResult</page>.</arg> <arg name="traceResult" type="table">The trace that hit this entity as a <page>Structures/TraceResult</page>.</arg> <arg name="damageType" type="number">The damage bits associated with the trace, see <page>Enums/DMG</page></arg> <arg name="customImpactName" type="string" default="nil">The effect name to override the impact effect with. Possible arguments are ImpactJeep, AirboatGunImpact, HelicopterImpact, ImpactGunship.</arg> </args> <rets> <ret name="" type="boolean">Return true to override the default impact effects.</ret> </rets> </function> <example> <description>Hides the original bullet impact effect and dispatches explosions instead.</description> <code> function ENT:ImpactTrace(trace,dmgtype,customimpactname) local effectdata = EffectData() effectdata:SetOrigin( trace.HitPos ) util.Effect( "Explosion", effectdata ) return true end </code> </example>

Special Pages


Wikis

?

Render Time: 13ms

DB GetPage 2
Get RevNew 1
Get RevOld 1
Render Body 0
Render Sidebar 7