Frictional Games Forum (read-only)
Help with sound problem - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Help with sound problem (/thread-5563.html)



Help with sound problem - Eyeball27 - 11-28-2010

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.


RE: Help with sound problem - Akumasama - 11-29-2010

Post the script please Smile


RE: Help with sound problem - Eyeball27 - 11-29-2010

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)


RE: Help with sound problem - LoneWolf - 11-29-2010

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.


RE: Help with sound problem - Eyeball27 - 11-29-2010

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)


RE: Help with sound problem - Eyeball27 - 11-30-2010

Problem solved. Turns out I had some random sound entities hidden in a pillar of all things D: