Frictional Games Forum (read-only)

Full Version: Script error help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
void OnStart()
{
AddEntityCollideCallback("Player","scr2","monster",true,1);
AddEntityCollideCallback("jim","scr1","monsterend",true,-1);
}


void monster(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("jim",true);
AddEnemyPatrolNode("jim", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("jim", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("jim", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("jim", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("jim", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("jim", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("jim", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("jim", "PathNodeArea_8", 0, "");
}
void monsterend(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("jim",false);
}

void keyfunc(string &in asEntity, string &in type)
{
SetEntityActive("servant_brute_1",true);
StartPlayerLookAt("servant_brute_1",15,15,"")
AddTimer("monstertimer",2,"monstertimer");
ShowEnemyPlayerPosition("servant_brute_1");
}
void monstertimer(string &in asTimer)
{
StopPlayerLookAt();
}


The non bold code is working fine, i wanted to add a scare event but i keep getting the following error message

[Image: scripterror.png]any suggestions?
StartPlayerLookAt("servant_brute_1",15,15,"")


You forgot a ; at the end
thanks again Smile your awesome help