View Single Post
Senior Member
zero00's Avatar
Status: Offline
Posts: 300
Join Date: Oct 2009
Default 08-05-2011, 11:37 AM

I did an experiment like that once. I'll post it when I find it.

Edit: I can't find it. Perhaps this will help?

To change volume while the sound is playing:
  1. Set the volume of sound you're playing to a variable (VolumeLevel = World.SoundVolume, for example)
  2. As the sound plays, you can change the variable and the volume will change accordingly (If you set "SoundVolume" to 0.5, the sound will play at half its volume)

As for changing volume based on range
, multiply that "SoundVolume" variable by a percentage of how close you are to something. If you're 50% within range, multiply the variable by 0.5 (or 0.25 if you're 75% away from the object)

==============Some of my Games and Ideas===========

Sky Warrior:
Health Bars:
Sky Warrior: Dual Force:

Want to make your own space game?

Last edited by zero00; 08-05-2011 at 11:53 AM.
Reply With Quote