Quote:
Originally Posted by Stefan
What? Works in v5, at least for the ocean sound on Kingdoms.
|
Quote:
Originally Posted by Crow
When using play2() or playlooped2() with coordinates, the "direction" of the sound playing doesn't update when the player moves, but stays the same all the time, from the point where the function is called. Not cool. Can't we make this dynamic?
|
The "problem" is that the sound doesn't update automatically when the player moves. This would ideally be the only thing needed:
PHP Code:
//#CLIENTSIDE
function onCreated()
playlooped2("mal_caveambience.wav", this.x, this.y, 1);
Then it would continuously refresh the sound strength/direction whenever the player moves, but that's not the case. For it to work, you need to use it in a timeout and run the command over and over again:
PHP Code:
//#CLIENTSIDE
function onCreated()
setTimer(.05);
function onTimeOut()
{
playlooped2("mal_caveambience.wav", this.x, this.y, 1);
setTimer(.05);
}