 dari1495 Registered User |
Quote
|
2017-04-02 20:23:03 |
|
Hi guys,
I'm trying to add a sound to an attack animation in a game where, if you hold the attack button pressed, it keeps attacking. The way I added the code for the sound, using play2D(), makes one sound to overlap with the last one for every iteration of the attack, very annoying.
So, I wonder if there is a way to make the engine sync, or blockable, to not let it play any other sound until the last one finishes (It's not problematic, the other fx aren't necessary at the same time)
Thanks in advance!
|
 erik Registered User |
Quote
|
2017-04-03 05:34:53 |
|
Yes, you can test if the sound has finished playing, using ISound::isFinished()
|