• Looping Sounds, anyone?
    1 replies, posted
So I made a small script that plays music when a certain event happens. It works... except for one thing. The music should loop as long as that event continues, but it won't. I replaced the music I'm using with another .wav file I had that I was sure it looped. And then it worked. So my question is, which format specificly (within the .wav extension) does it accept as a loopable sound?
You need to create cue points, namely start_cue and end_cue. When you use Sound:Play( ) the sound will start at the beginning, and when it reaches the end cue it will go to the start cue until Sound:Stop( ) is called. So you can have the start of the sound be something like a car starting and then in the middle have the engine running and make the start_cue somewhere in the middle and the end_cue at the end which could produce a nice engine_idle sound after it was started as an example. [url]https://developer.valvesoftware.com/wiki/Looping_a_Sound[/url]
Sorry, you need to Log In to post a reply to this thread.