Page 1 of 1

active_sound plays sound every time the entity is aproached

Posted: Sun Mar 26, 2017 8:47 pm
by Wizard Marcos
First, I'm not sure if this should be considered a bug.
What happens is: I created an entity (in this case, a diesel generator), and added a startup to activate_sound, similarly to how a car has one for when you enter it. However, instead of just playing the sound once when I feed it oil and it turns on (which it also does, the way it should), it plays every time I approach the entity (I move a couple blocks away, around 30, and when I go back it plays the sound).

It also has a loop sound, which plays correctly, and a turn-off sound, that also plays correctly.

Re: active_sound plays sound every time the entity is aproached

Posted: Thu Apr 27, 2017 10:09 pm
by Rseding91
That's how sounds work in our engine - so it's working as intended :P

Sounds aren't part of the game state so when you walk away from something the game stops tracking what it was playing and when you get close again it starts up fresh.