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
Delirium92 Offline
Senior Member

Posts: 295
Joined: Mar 2011
Reputation: 7
Post: #9
RE: Scripting Answers
(07-26-2011 01:12 PM)HumiliatioN Wrote:  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

well is your script area called BlowDoor?

if so then try having the door open amount 2 or something.

also you have allot of }

one more thing i noticed you have this
AddPropImpulse("blow_door", -0.5f, 0, 0.5f, "World");
i think the "-0.5f, 0, 0.5f," are conflicting and stoping the door from opening.

[Image: rOQPbPF.gif]
(This post was last modified: 07-26-2011 01:23 PM by Delirium92.)
07-26-2011 01:16 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)