Detecting Sound Radius
TouchTiltGames
Member Posts: 1,162
Hey guys, I am looking for a tutorial or video tutorial or..template on sound radius.
As you get closer to an actor the sound gets louder, as you move farther away it gets quieter.
Cheers!
As you get closer to an actor the sound gets louder, as you move farther away it gets quieter.
Cheers!
Comments
Now you can put game.SoundDistance in the expression editor of the play sound behavior. If you just set the volume to that attribute it will be the opposite of what you want (i.e. louder the farther away you are) so you will need to have some number (experiment with it) divided by game.sounddistance.
good luck! Sounds very interesting!
How would I write this? I have game.soundDistance /2
Is that correct?
On my actor that plays the sound I have:
Game.soundSourceX to: self.positionX
Game.soundSourcey to: self.positionY
In the PlaySound behaivor I have Game.SoundDistance in the Volume.
In the moving actor I have:
Constrain: Game.soundDistance to: magnitude(self.positionX-game.soundsourceX, self.positionY-game.soundsourceY)
Not sure this is working properly..hehe.
search "closer to sound"