Frictional Games Forum (read-only)

Full Version: Play Sound Problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
*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?)
I have a similar code and it's set to 2.0, so try

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