Moving Sounds (ambient_generic)

Aeix

L3: Member
Feb 14, 2016
147
58
So some stuff I am currently working on involves func_tracktrains and a sound source moving with the func_tracktrain, which should be easy.
However, the func_tracktrain pitch shifts the sound file I set it to play when it moves.
So I tried an ambient_generic to play the sound (also gives much more control over the sound as I am sure you know) but then I realised you can't parent it to another entity.
Any suggestions guys? A way of getting the ambient_generic to move with the func_tracktrain would be most ideal, but values that I can put into the func_tracktrains options to prevent it from pitch shifting the audio file when it moves would also be greatly appreciated!
 

wiseguy149

Emperor of Entities and Amateur of Aesthetics
May 12, 2009
103
220
Ambient_generics themselves cannot be parented to anything, but you can use the SourceEntityName keyvalue to make their sounds originate from another entity. You can simply set the SourceEntityName to your func_tracktrain.
 

iiboharz

eternally tired
aa
Nov 5, 2014
857
1,291
Alternatively, you could change the min and max pitch to 100 which I believe sets it to normal. Saves you using an ambient_generic to work around it.