(Solved) Walking sound / Rapid Fire sound


I put a walking sound every time it hits frame 0 of my animation.
It is very inconsistent with the when it plays and when not.
Sometimes it plays once every 5 steps sometimes 3 etc… but never the correct amount of steps.

Does anybody have a solution to this?

Important note: It does work when i preview on the computer but not on my tablet or phone.

Also i did optimise my game and its currently at ± 1.20 ms for the whole process


upload the files to mega or mediafire and send a link so i can help you


I cannot just upload the game because its as good as done.
But basically whats happening is as i showed.
A player hops from one place to the next when it hits a sprite that defines the space it should make a sound. So i can show you the full calculation i’m doing… I would really appreciate any help because its really frustrating and its the only thing keeping me from releasing the game.


I don’t know if it has anything to do with the problem, but you are calculate twice the “Distance2” variable’s value in a row. the second action overwrite the first immediately. thus the first result can’t do anything. so it’s completely unnecessary there.


I round the number of the Distance2 in second one. Its necessary for the calculation of the animation frame because it needs to be a round number for it to be accepted as a frame.


oh. I see now. ok. sorry. I think you can do it in one line, but it’s ok.


I solved the sound issue.
Apparently the sound needs to be a certain length.
So what i did before is I had a sound and I made it as short as possible
because it would be played fast after each-other.
So when i started testing with other sounds it gave me the idea that
maybe it’s too short because others would play.
They were both .wav so that was the same so…
I wanted exactly the sound from before so what i did was added no volume sound
in the file as seen in the picture of the waveform.
That way it would be long enough and still be the sound i wanted. And it worked.
So Problem solved!