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
Script Help Error at door slam script
KingCrimson Offline
Junior Member

Posts: 45
Threads: 14
Joined: Jul 2012
Reputation: 0
#3
RE: Error at door slam script

(07-07-2012, 09:04 PM)andyrockin123 Wrote: You have an extra "}" after the function
func_slam. I removed it:



////////////////////////////
// Run when the map starts
void OnStart()
{
AddEntityCollideCallback("Player", "script_slam", "func_slam", true, 1);
}

void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("door2", true, true);

PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);

PlaySoundAtEntity("", "react_scare", "Player", 0, false);

PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);

GiveSanityDamage(5.0f, true);
}


////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
Thanks, now it doesn't send me a FATAL ERROR. But now the door doesn't slam ._. ¿Must i place an script area on the map?

Current Projects:
DADDY - 10%
07-07-2012, 09:36 PM
Find


Messages In This Thread
Error at door slam script - by KingCrimson - 07-07-2012, 09:01 PM
RE: Error at door slam script - by Adny - 07-07-2012, 09:04 PM
RE: Error at door slam script - by KingCrimson - 07-07-2012, 09:36 PM
RE: Error at door slam script - by Adny - 07-07-2012, 09:39 PM
RE: Error at door slam script - by KingCrimson - 07-07-2012, 09:48 PM



Users browsing this thread: 1 Guest(s)