 guest_edkeyte Guest |
Quote
|
| Yesterday |
|
Is there a way to loop sound when using an external sound file?
Eg like this but with a way to loop the sound:
// Play sound when entering the zone
if (typeof this._played === "undefined") { this._played = true; ccbPlaySound("sound/test.wav"); }
|
 dekon_17 Registered User |
Quote
|
| Yesterday |
|
Don't think it's possible with this command. However, you can do something else, although it will be a bit more complex.
Instead of using ccbPlaySound, add a sound node, and, when you need to play that external sound, do something like this:
... if (!this._played){ this._played = true; ccbSetSceneNodeProperty (ccbGetSceneNodeFromName ([sound node name]), 'SoundFileName', "sound/test.wav"); } ...
Had to use something like that myself, due to the fact that you can't control sound volume and play mode of a ccbPlaySound.
|
 guest_edkeyte Guest |
Quote
|
| Today |
|
That's excellent. Thank you so much. Really, really helpful.
|