Frictional Games Forum (read-only)

Full Version: StopSound Not Working With Fade?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So, I've encountered a strange bug. StopSound doesn't seem to work for looping .snt files, if the afFadeTime value is anything but zero. Have tested it with 24_mb_02 and 24_knife specifically. Was just wondering if anyone has had a similar experience with this.

void soundToggle()
    if (booleanVariable = false)
        StopSound("groaning", 0); // If this is anything but zero, the script doesn't seem to work. That is to say, the sound just doesn't stop.
        AddDebugMessage("Sound stop.", false);
    if (booleanVariable = true)
        PlaySoundAtEntity("groaning", "24_mb_02", "mainHallBody", 4, true); // Doesn't seem to matter if abSaveSound is true or false.
        AddDebugMessage("Sound start.", false);
Have you tried with other looping sounds?
(10-30-2015, 08:52 PM)FlawlessHappiness Wrote: [ -> ]Have you tried with other looping sounds?
No, not yet. I'll try it out with a few other custom looping sounds. I'm wondering if maybe the pause between loops is the issue, as both of the aforementioned sounds have delays between repeats.