Frictional Games Forum (read-only)

Full Version: Help with sound problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I added a music cue into my script, and it works perfectly, however, whenver I start my map this music cue, even though untriggered, will play 4 instances of itself simultaneously, making it not only unwanted but painful as well.

I have removed the music cue from my script, and it still happens, leading me to think that the problem might be elsewhere. Any insight would be great.
Post the script please Smile
Here is the portion with the sound cue. (scare_whine_loop1)

Code:
void collideroom1(string &in asParent, string &in asChild, int alState)
{    
    SetSwingDoorClosed("door_2", true, true);
    
    SetSwingDoorClosed("door_1", true, true);

    SetSwingDoorLocked("door_2", true, true);
    
    SetSwingDoorLocked("door_1", true, true);
        
    StartPlayerLookAt("door_2", 2.0f, 1.0f, "");
    
    PlaySoundAtEntity("", "scare_slam_door", "door_2", 0, false);
    
    PlayGuiSound("react_scare", 1.5f);
    
    PlayMusic("scare_whine_loop1", false, 1.5, 0.1, 10, false);
    
    GiveSanityDamage(5.0f, true);
    
    AddTimer("Scare2", 0.5f, "stopstare");
}

But even when I disable the sound cue, even remove it from the script entirely, the sound still plays when I load the map.

I'm very new to scripting and I fool around with stuff till it works (for example, Im pretty sure I'm using PlayGuiSound wrong, but it does work)
Are you using script areas for the sound files? instead of placing sound icons place script area and name it what ever you want, Jens todl me this not long ago and it works well.
That entire function is tied to a script area, if that's what you mean...

Again, I don't think this is a script problem, as the problem persists even when I've removed the sound cue from it. (and yes, I've saved)
Problem solved. Turns out I had some random sound entities hidden in a pillar of all things D: