Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PlaySoundAtEntity not working
baegles Offline
Junior Member

Posts: 6
Threads: 4
Joined: Nov 2018
Reputation: 0
#1
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.)
06-16-2020, 08:46 PM
Find




Users browsing this thread: 1 Guest(s)