
10-20-2002, 12:09 AM
|
|
Banned
|
 |
Join Date: Oct 2002
Location: Wales, UK
Posts: 828
|
|
|
And the bubbling should get less loud as you walk away from it.
// NPC made by R0bin
//#CLIENTSIDE
if (timeout) {
this.loudness=10;
dx=abs(playerx-x);
dy=abs(playery-y);
rdx=0-dx;
rdy=0-dy;
if (dx<this.loudness||dy<this.loudness) setmusicvolume (rdx/this.loudness+1+rdy/this.loudness+1)/2,(rdx/this.loudness+1+rdy/this.loudness+1)/2;
if (dx>this.loudness||dy>this.loudness) setmusicvolume 0,0;
timeout=0.05;
} elseif (!timeout) {
playlooped stef1.mid;
timeout=0.05;
}
just like that. |
|
|
|