Because just "position" plays on every surface...
Happy New Year!
LuaForce.play_sound{surface=}
- eradicator
- Smart Inserter
- Posts: 5206
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
LuaForce.play_sound{surface=}
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
- eradicator
- Smart Inserter
- Posts: 5206
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: LuaForce.play_sound{surface=}
Is not force sensitive obviously.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: LuaForce.play_sound{surface=}
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=}
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!
I may be misunderstanding of course
Happy New Year!
- eradicator
- Smart Inserter
- Posts: 5206
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: LuaForce.play_sound{surface=}
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.PyroFire wrote: ↑Tue Dec 31, 2019 1:39 pmGave 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
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.