Author Topic: Problem with sound: Cannot cancel sound playing on player after a few seconds.  (Read 626 times)

Okay, i have this playertype that has a sound that plays and when they stop doing this action, they should stop playing the sound. IT works if they do the action really quickly, but if they wait to long the sound continues to play until the audio file ends.
Its really annoying me and ive tried switching descriptions on the audio profiles. How do i fix this?

alxStop(AudioProfile);


Does not work.

It does work. Subpixel just didn't mention that alxStop is a client-sided command, which doesn't really work out for what you want.

As far as I understand, there isn't really a good way of stopping a sound. What might work is if instead of playing the sound through a regular method, you instead spawn a 3Dsound object that plays the sound effect. When the sound needs to be cut off, you simply delete the sound object. (I think this would work, but I could be wrong)

%obj.playAudio(slot, profile);
%obj.stopAudio(slot);

IIRC

%obj.playAudio(slot, profile);
%obj.stopAudio(slot);

IIRC

This is what i was originally doing, which did not work.