Train bells occasionally not stopping

Scary-Jello

L1: Registered
Jul 26, 2020
10
1
I've been working on a map that features a train near point A, i've followed this tutorial on how to make train and it works fine. However, very occasionally, the 2 ambient generic entities that play the bell sounds just, never stop, seemingly at random. Sometimes the sound loops on both entities, sometimes just one of them, sometimes it runs smoothly no matter what.

My current setup is attached:
0.png
1.png
2.png

The bells are set to a volume of 0 by default, and turned to 10 when a timer goes off, once the train passes a path_track, the bells are set to 0 again.

Any help on how to fix this or even why it happens would be much appreciated!
 
D

Deleted member 33500

Instead of using Volume inputs, try using PlaySound (Plays a sound, and if it has looping in the Flags tab checked, it repeats basically forever until it is stopped by an input) and StopSound (Stops any looping sounds) inputs for the ambient_generic entities.
 

Scary-Jello

L1: Registered
Jul 26, 2020
10
1
Thank you, I saw a thread a while ago saying to use volume inputs because using PlaySound and StopSound only works for looping sounds, but I, for some reason, never thought to flag them as looping.