View Single Post
  #12  
Old 10-20-2002, 12:09 AM
R0bin R0bin is offline
Banned
R0bin's Avatar
Join Date: Oct 2002
Location: Wales, UK
Posts: 828
R0bin is on a distinguished road
Send a message via AIM to R0bin
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.
Reply With Quote