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
Making a scream play when player enters a room?
Austums Offline
Member

Posts: 60
Threads: 11
Joined: Mar 2011
Reputation: 0
#26
RE: Making a scream play when player enters a room?

Okay, so I added the react sound all by myself and it works, but I realized Daniel won't stop looking at the door!

I'm stumped as to what the problem is. I put the StopPlayerLookAt();

void OnEnter()
{
}

void OnLeave()
{
}

void OnStart()
{
AddEntityCollideCallback("Player", "Scream_1", "Scream_1", true, 1);
}
void Scream_1(string &in asParent, string &in asChild, int alStates)
{
   AddTimer("Somenamedoesntreallymatter", 6.0f, "Scream_Trigger");
}

void Scream_Trigger(string &in asTimer)
{
   PlaySoundAtEntity("Scream_1", "12_girl_scream.snt", "Scream_1", 0, false);
   PlaySoundAtEntity("Scream_1", "react_scare.snt", "Scream_1", 0, false);
   StartPlayerLookAt("LookArea_1", 2, 2, "");
   AddTimer("Somenamedoesntreallymatter", 6.0f, "LookArea_Trigger");
}
void LookArea_Trigger(string &in asParent, string &in asChild, int alStates)
{
   StopPlayerLookAt();
}
03-23-2011, 05:27 AM
Find


Messages In This Thread
RE: Making a scream play when player enters a room? - by Austums - 03-23-2011, 05:27 AM



Users browsing this thread: 1 Guest(s)