Having trouble stopping a local sound

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Ghastly
... in rememberance ...
Posts: 6109
Joined: Fri Jul 06, 2007 2:34 pm

Having trouble stopping a local sound

Post by Ghastly »

So I'm trying to play a looping sound on the player, and since I don't want other players to hear it, I'm playing is local for the player. Being a looping sound, I then try to stop it with A_StopSound, but unfortunately it won't stop. I figured there's some channel shenanigans going on, but I tried playing the sound on CHAN_5 | CHAN_MAYBE_LOCAL and stopping that, but that didn't work either. Am I missing something, or is this some bug?

I've attached a test wad so you can see it. Summon LocalSoundLooper to start it and LocalSoundStopper to stop it. Side note, if there's a better way to loop a sound for the player for the entire duration a powerup's running, I'd love to know about it.
Attachments
LoopingLocalSound.zip
(4.09 KiB) Downloaded 44 times
Post Reply

Return to “Scripting”