I've made a simple music engine which is choosing which note to play next within the 7 notes octave. Now when the action gets intense it's starting triggering notes very quickly and after few voices stack up it's skipping the sound and triggering it with next available voice.
So i thought that if i give it a tag which is equivalent to the variable that is triggering the sound and then when next sound starts playing the variable is being used as a tag of a sound to stop playing after short delay. Well this doesn't seam to work, and sounds are still stacking.
Here's the shot from part of the system. There is 7 conditions in total but they not on the picture.