Garry's Mod Wiki

effects.TracerSound

  effects.TracerSound( Vector start, Vector endpos, number tracerType = 1, string soundOverride = nil )

Description

Imitates the "near miss" tracer sound, with the ability to override the sound played.

The frequency of the sound is limited internally, as to not overwhelm the player. (same as normal tracers)

Arguments

1 Vector start
Start position of the tracer.
2 Vector endpos
End position of the tracer
3 number tracerType = 1
Tracer type. Acceptable values are:
  • 1 - Normal bullet
  • 2 - Gunship bullet
  • 4 - Strider bullet
  • 8 - Underwater bullet

This affects the default sound, as well as the distance from which the sound can be heard compared to the closest point on the tracer line to the player's eyes.

4 string soundOverride = nil
If set, this sound will be played instead of the default sound.