| PlaySoundAtEntity not working 
 
				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);
 
 ShowEnemyPlayerPosition("Brute01");
 
 RemoveTimer("StopPlayerLookAt");
 
 AddUseItemCallback("", "Key01", "LevelWood", "UnlockDoor", true);
 
 }
 
 
 void UnlockDoor(string &in asItem, string &in asEntity)
 {
 
 PlaySoundAtEntity("", "unlock_door.ogg", "LevelWood", 1.0f, false);
 
 SetLevelDoorLocked("LevelWood", false);
 
 RemoveItem("Key01");
 
 }
 
 
 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);
 
 SetPlayerSanity(75.0f);
 
 }
 
 
 void StopPlayerLookAt(string &in asTimer)
 {
 
 StopPlayerLookAt();
 
 }
 
				
(This post was last modified: 07-01-2020, 06:01 AM by baegles.)
 |