Frictional Games Forum (read-only)
Play 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: Play Sound Problem (/thread-6099.html)



Play Sound Problem - pawsUp1703 - 01-07-2011

Hello :) I'm very new at building with the editor but I think I made a quite good map and scripting isn't as difficult as i thought.. until now...
I made a trigger area and used the AddEntityCollideCallback to make somethign happen when the player reaches this area.
However a sound i wanted to trigger doesn't play but all the other things work:
Code:
AddEntityCollideCallback("Player", "DoorSlamArea1", "DoorSlam1", true, 0);

void DoorSlam1(string &in asParent, string &in asChild, int alState)
{
    SetSwingDoorClosed("castle_arched01_3", true, true);
    SetSwingDoorLocked("castle_arched01_3", true, true);
    SetLampLit("torch_static01_4", false, true);
    SetLampLit("torch_static01_3", false, true);
    SetLightVisible("PointLight_9", false);
        PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false);
        GiveSanityDamage(5.0f, true);


}

has anybody an idea why everything except the sound works?
and how i can make the sound play?


RE: Play Sound Problem - Makiavel - 01-07-2011

*I misread the question and wrote wrong answer here, sorry*
Maybe it has something to do with fadetime = 0 (perhaps it always has to be>0?)


RE: Play Sound Problem - Russ Money - 01-08-2011

I have a similar code and it's set to 2.0, so try

Code:
PlaySoundAtEntity("", "react_scare.snt", "Player", 0.1, false);