- Messages
- 368
- Country
I've been playing around with a Lua script to play custom sounds and was wondering if anyone had got looping sounds to work correctly? I'm using soundSetProperties(SoundID, true, true) to set the loop off.
If I have an if/then check that triggers the sound as long as the conditions are meet it basically keeps starting the sound rather than playing it all the way through. If I have a check that stops the conditions being met after the first time through it plays the first fraction of a second of the sound and then stops rather than leaving the loop playing until I set the play condition to false.
I can get the soundOneShot command to play the whole clip through once, but that's not overly useful.
Any ideas?
If I have an if/then check that triggers the sound as long as the conditions are meet it basically keeps starting the sound rather than playing it all the way through. If I have a check that stops the conditions being met after the first time through it plays the first fraction of a second of the sound and then stops rather than leaving the loop playing until I set the play condition to false.
I can get the soundOneShot command to play the whole clip through once, but that's not overly useful.
Any ideas?