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


Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scripting Answers
HumiliatioN Offline
Posting Freak

Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation: 18
#8
RE: Scripting Answers

Why this is not working?

void OnStart()
{
AddEntityCollideCallback("Player", "BlowDoor", "BlowDoorFunction", true, 1);
}

void BlowDoorFunction(string &in asParent, string &in asChild, int alState)
{
AddTimer("aha", 0.1f, "OpenDoor");
AddTimer("aso", 0.3f, "OpenDoor");
StartPlayerLookAt("blow_door",3.0,1.0,"");
}

void OpenDoor(string &in asTimer)
{
if(asTimer == "aha"){
AddPropImpulse("blow_door", -0.5f, 0, 0.5f, "World");
GiveSanityDamage(20.0f,true);
PlaySoundAtEntity("", "scare_tingeling.snt", "Player", 0, true);
}

if(asTimer == "aso"){
PlaySoundAtEntity("", "react_breath.snt", "Player", 0, true);
StopPlayerLookAt();
}
}

Why when Area activates that door it has to be "Forced open" like begin normal Amnesia that ghostdoor Sad

“Life is a game, play it”
07-26-2011, 01:12 PM
Find


Messages In This Thread
Scripting Answers - by Kyle - 05-10-2011, 07:03 PM
RE: Scripting Answers - by Simpanra - 05-10-2011, 07:21 PM
RE: Scripting Answers - by Kyle - 05-10-2011, 07:38 PM
RE: Scripting Answers - by Simpanra - 05-10-2011, 07:58 PM
RE: Scripting Answers - by Tesseract - 07-26-2011, 11:14 AM
RE: Scripting Answers - by Kyle - 07-26-2011, 12:23 PM
RE: Scripting Answers - by Tesseract - 07-26-2011, 01:06 PM
RE: Scripting Answers - by HumiliatioN - 07-26-2011, 01:12 PM
RE: Scripting Answers - by Tesseract - 07-26-2011, 01:16 PM
RE: Scripting Answers - by Kyle - 07-26-2011, 01:34 PM
RE: Scripting Answers - by HumiliatioN - 07-26-2011, 01:35 PM



Users browsing this thread: 1 Guest(s)