how to make a sound that loop when the health is below than 20.i want to make a heartbeat sound looping when the health is low.i made a heartbeat.wav with duration about 2 seconds and when the player dead i want to stop the loop tq :v
[highlight](User was banned for this post ("See DEVELOPER DISCUSSION/GMOD WIKI for help" - NiandraLades))[/highlight]
You need to use a program like gold wave to add cue points to your sound file so that source knows to loop it, then for stopping it you can just use CSoundPatch or Stop() on the audio channel returned from sound.PlayFile if you use that
Or you could just make a timer that plays the sound as soon as it ends until your health gets above the desired amount, more then likely the sound bite wouldn't be more than a second or two so you wouldn't have to stop it but if it is necessary to stop it then just run console command stopsound
Sorry, you need to Log In to post a reply to this thread.