call RunSound(yourSoundStructInstance)
and you can create a sound like this: NewSound("file path", durationInMilliseconds, looping, 3D)
KillSoundWhenDone
works as expected, it destroys the sound when it is finished to be played.KillSoundWhenDone
is not working as it should do, nor StopSound
. I keep tracking handle counts, but every time I play a sound handle's count increasing. Same with your system maggy... Leaks same as my 10 line code Also you know my opinion of all vJass structs and other shitz I'd never use them TriggerWaitForSound
), so the sound is probably not destroyed in this case, and in any other case when the sound is not played (probably player lag, wc3 minimized, ...)You know that a local handle variable has to be nulled ? (function parameters are not concerned by this bug)
Else you will leak an handle id when the handle will be destroyed, just as you are describing.
EDIT for your EDIT: I have sound enabled, but I think that is only for musics... I am not sure.
Maggy... I have just one question: If I have a non looping sound then your system will auto-remove it?