Hi guys,
I just started using GGSound library, and it seems great to manage sound on composer scene transitions.
https://github.com/GlitchGames/GGSound
I have just one question.
local sound = GGSound:new{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 ,14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 } sound:add(audio.loadSound("sounds/jump1.mp3"), "jump1") sound:add(audio.loadSound("sounds/jump2.mp3"), "jump2") sound:add(audio.loadSound("sounds/jump3.mp3"), "jump3")
How can I group jump1, jump2 and jump3 sounds that are created in GGSound library and randomly play those three sounds ( via sound:play( “???” ) ) ?
That is easy when I am not using GGSound.
I do it like this:
------------------------------------------------- DECLARATION local jump1 = audio.loadSound ( "sounds/jump1.mp3" ) local jump2 = audio.loadSound ( "sounds/jump2.mp3" ) local jump3 = audio.loadSound ( "sounds/jump3.mp3" ) local Jumps = {jump1, jump2, jump3 } ------------------------------------------------ PLAY local number = math.random(#Jumps) audio.play(Jumps[number])
Waiting your reply!
Many thanks 
Ivan
