I have a gameobject with three different sounds attached to it as well as this code. The code should play each of the sounds once, in turn, after the set delay and then repeat from the start of the code
function init(self)
for i=1,100 do
sound.play("/sound#creak1", {delay = 10, gain = 0.1})
sound.stop("/sound#creak1")
sound.play("/sound#creak2", {delay = 17, gain = 0.1})
sound.stop("/sound#creak2")
sound.play("/sound#creak3", {delay = 29, gain = 0.1})
sound.stop("/sound#creak3")
i = i + 1
end
end
however, it keeps coming up with this error
(sorry i couldnt fit the entire error in one photo)
i don’t think all the sound instances should be in use? that’s why i put to stop the sound in the code but i’m not sure what’s going wrong.
if anyone has any advice that would be really appreciated!