daniel0514 Posted May 8, 2015 Share Posted May 8, 2015 Hi, I'm currently working on a vertical scroller and I'm having some issues when playing a sound on collision.I have a ball and i want to play a bounce sound when it collides with the platforms, the problem is, when the ball stays on the platforms (not moving), the sound just keeps playing over and over until I left that platform and jump to another. How can i play the sound just once? Link to comment Share on other sites More sharing options...
1ipt0n Posted May 8, 2015 Share Posted May 8, 2015 what phisics are You using? You can allways do something like that://after creating ballball.last_platform = null;// inside colide functionif(ball.last_platform != this_platform) sound.play();ball.last_platform = this_platform Link to comment Share on other sites More sharing options...
Recommended Posts