Thread: Uhm...
View Single Post
  #18  
Old 01-20-2006, 04:18 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Quote:
Originally Posted by KuJi
Is their a way to make it so if your close to an npc that is streaming a song you will hear it louder, and if you walk away it will go lower. :O
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

For music: eventually save the position where the music should be loudest (position of the radio npc or so) and then change the music volume with setmusicvolume all few moments (0.05 seconds) depending on the distance of the player to the distance of the music source / radio npc.
This kind of system is also good for environmental sound effects, we are using that for the ocean sound on Era and the shephard melody on Kingdoms (xmas quest), changing the volume depending on the distance to the source (with play2).
Reply With Quote