Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 2 Votes - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scripting Answers
Author Message
HumiliatioN Offline
Posting Freak

Posts: 982
Joined: Dec 2010
Reputation: 10
Post: #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

Investigator - WIP
07-26-2011 01:12 PM
Find all posts by this user Quote this message in a reply
Post Reply 


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



User(s) browsing this thread: 1 Guest(s)