Quote:
Originally Posted by Stefan
For looping wavs: call playlooped all few moments to update the position of the sound, the volume will automatically be adjusted depending on the position of the npc on the screen
|
I've tried this and discovered that playlooped only adjusts the volume in relation to the player one time. (when the player enters the level or the npc is created)
This was tested on both a single level and a gmap and both times it's only adjusting the volume once.
NPC Code:
//#CLIENTSIDE
function onCreated() {
setTimer(.05);
}
function onTimeout() {
playlooped("bomb.wav");
setTimer(.05);
}
This is technically supposed to make it so if the player walks away from the npc, it should get quieter... but it only sets the volume of the playlooped the first time. (same with playlooped2)