Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help StopSound Not Working With Fade?
BonesTheRabbit Offline
Member

Posts: 68
Threads: 20
Joined: Feb 2012
Reputation: 2
#1
StopSound Not Working With Fade?

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);
    }
}
(This post was last modified: 10-30-2015, 02:45 AM by BonesTheRabbit.)
10-30-2015, 02:45 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#2
RE: StopSound Not Working With Fade?

Have you tried with other looping sounds?

Trying is the first step to success.
10-30-2015, 08:52 PM
Find
BonesTheRabbit Offline
Member

Posts: 68
Threads: 20
Joined: Feb 2012
Reputation: 2
#3
RE: StopSound Not Working With Fade?

(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.
11-05-2015, 10:55 PM
Find




Users browsing this thread: 2 Guest(s)