Frictional Games Forum (read-only)

Full Version: PlaySoundAtEntity not working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am having trouble with getting the PlaySoundAtEntity script. when I enter an the area, the script    PlaySoundAtEntity("", "react_pant1.ogg", "Player", 1.0f, false);  is not working. I know the script area I have works because everything else in Brute_Spawn_01 works. It's just the sound script that won't work. What am I doing wrong?

void OnStart()

    PlayMusic("04_amb.ogg", true, 1, 2, 0, true);
  AddEntityCollideCallback("Player", "AreaCollide01", "Brute_Spawn_01", true, 1);

AddUseItemCallback("", "Key01", "LevelWood", "UnlockDoor", true);

 void UnlockDoor(string &in asItem, string &in asEntity)

PlaySoundAtEntity("", "unlock_door.ogg", "LevelWood", 1.0f, false);
SetLevelDoorLocked("LevelWood", false);

 void Brute_Spawn_01(string &in asParent, string &in asChild, int alState)
SetEntityActive("Brute01", true);
StartPlayerLookAt("Brute01", 10.0f, 10.0f, "");
AddTimer("", 1.0f, "StopPlayerLookAt");

PlaySoundAtEntity("", "react_pant1.ogg", "Player", 1.0f, false);


 void StopPlayerLookAt(string &in asTimer)