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

Posts: 498
Threads: 7
Joined: Mar 2011
Reputation: 18
#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.
(This post was last modified: 07-26-2011, 01:23 PM by Tesseract.)
07-26-2011, 01:16 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)