Topic: Play sound once
Hi,
I am having problems getting a sound to play once in my script.
At the start:
soundplay = 0
function playsound()
if soundplay == 0 then playSound(Sound0) end
soundplay = 1
end
Then:
function onSceneUpdate()
if isCollisionBetween(Car, Ground)
if soundplay == 0 then playsound()
else
soundplay = 0
end
end
It loops repeatedly, but I'm not sure why, could anyone help?