Quantcast
Channel: Latest Questions by BLOODragonGames
Viewing all articles
Browse latest Browse all 14

How do you make loop sounds exclusive to distance in C#?

$
0
0
In my game, when the enemy gets to a certian distance, audio (for an example, the sound is called "bread") will be played/looped. When he is farther away (or you move farther away) the audio will stop playing (but will still be true to play when the enemy gets close again to you). As you progress (let's say, you collected 3 "bacon strips" [for an example]) the distance needed to play the audio will be longer than when you were at one. Can someone please give me an example using those listed above (I ask only so I can figure where to put "audio" and where to put "bread")?

Viewing all articles
Browse latest Browse all 14

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>