Page 1 of 1
LuaForce.play_sound{surface=}
Posted: Tue Dec 31, 2019 12:27 pm
by eradicator
Because just "position" plays on every surface...
Happy New Year!
Re: LuaForce.play_sound{surface=}
Posted: Tue Dec 31, 2019 12:29 pm
by PyroFire
Re: LuaForce.play_sound{surface=}
Posted: Tue Dec 31, 2019 1:13 pm
by eradicator
Is not force sensitive obviously.
Re: LuaForce.play_sound{surface=}
Posted: Tue Dec 31, 2019 1:39 pm
by PyroFire
eradicator wrote: ↑Tue Dec 31, 2019 1:13 pm
Is not force sensitive obviously.
You got me there.
I was looking at an old post where i made a similar suggestion.
Guess we really do need surface specification on luaforce.playsound, if you want force-specific surface-specific sounds
*Edit
Gave it some thought and you could do the processing and conditions in lua and play it individually per player (if you really needed to):
https://lua-api.factorio.com/latest/Lua ... play_sound
Re: LuaForce.play_sound{surface=}
Posted: Tue Dec 31, 2019 3:59 pm
by Squelch
Could a surface be considered to be part of the environment? I do understand that there may be occasions where a sound may need to be exclusive to a force, or even an individual player, but when it comes to environmental sounds made by other entities such as other players, biters etc, it seems strange that they may be silently performed - unless stealth actions are indeed the intention.
I may be misunderstanding of course
Happy New Year!
Re: LuaForce.play_sound{surface=}
Posted: Wed Jan 01, 2020 4:21 am
by eradicator
You can do all sorts of stuff by looping. My point is that LuaForce.play_sound is incomplete in a three-dimensional coordinate system (x,y,surface) if i can only specify two coordinates. With just position the sound will *never* be played as expected, because nobody expects stuff to happen on all surfaces simultaneously.