Just make simple logical "if" comparison in a while loop, like this:
Code:
if(run_once == 0)
{
     snd_play(attack_wav,80,0);
     run_once = 1;
}

You should remember that in while loop everything works each frame again and again.
So with this comparison sound will play only once. To play it again, you'll need to set "run_once" back to zero.
Set it back to zero when animation fully played, check that by animation percentage.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung