active_sound plays sound every time the entity is aproached

Bugs that are actually features.
User avatar
Wizard Marcos
Inserter
Inserter
Posts: 22
Joined: Mon Jan 16, 2017 7:12 pm
Contact:

active_sound plays sound every time the entity is aproached

Post 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.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14360
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: active_sound plays sound every time the entity is aproached

Post 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.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Not a bug”