The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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 Scripting help
Turner64 Offline
Junior Member

Posts: 4
Threads: 1
Joined: Apr 2012
Reputation: 0
#1
Scripting help

Hi, I have had this scripting problem for a while now and I have been searching on the internet for solutions but I have not yet found one. I have turned to this website for a solution, I'm hoping someone here can help me. My scripting looks all right but when I get on Amnesia: The Dark Descent I get a FATAL ERROR: (29,1) unexpected token '{' I will post my script below.

void OnStart()
{
SetEntityPlayerInteractCallback("lantern_1", "ActivateMonster", true);
}

void OnEnter()
{

}

void OnLeave()
{

}

void ActivateMonster(string &in item)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_7", 0, "Idle");
}
////////////////////////////
//void OnStart()
{
AddEntityCollideCallback("Player", "push", "Push", true, 1);
AddEntityCollideCallback("Player", "door_slam", "Slam", true, 1);
}


void Push(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "react_pant.snt", "push", 0, false);
AddPlayerBodyForce(30000, 0, 0, false);
}


void Slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_12", true, true);
SetSwingDoorLocked("mansion_12", true, true);
PlaySoundAtEntity("", "00_laugh.snt", "door_scare", 0, false);
}

void OnEnter()
{

}

void OnLeave()
{

}
04-14-2012, 11:05 PM
Find


Messages In This Thread
Scripting help - by Turner64 - 04-14-2012, 11:05 PM
RE: Scripting help - by Cranky Old Man - 04-14-2012, 11:07 PM
RE: Scripting help - by Xanthos - 04-14-2012, 11:08 PM
RE: Scripting help - by SilentStriker - 04-14-2012, 11:09 PM
RE: Scripting help - by Turner64 - 04-14-2012, 11:11 PM
RE: Scripting help - by Cranky Old Man - 04-14-2012, 11:18 PM
RE: Scripting help - by SilentStriker - 04-14-2012, 11:16 PM
RE: Scripting help - by Turner64 - 04-15-2012, 12:10 AM
RE: Scripting help - by SilentStriker - 04-15-2012, 12:11 AM
RE: Scripting help - by Turner64 - 04-15-2012, 12:13 AM
RE: Scripting help - by SilentStriker - 04-15-2012, 12:13 AM



Users browsing this thread: 1 Guest(s)