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
Need help with script error
liquiddr3amz Offline
Junior Member

Posts: 14
Threads: 5
Joined: Nov 2012
Reputation: 0
#1
Need help with script error

ok so i took a break from a custom story i was working on, i picked it back up, i decided (as shown in bold) i would like the door to lock after it slams shut, and then use a hollow needle to open it, does it matter if i code from bottom of my script or do i got to go back up to the middle where it is bold? i keep getting errors(when i try changing it, this script currently works) can someone please help?

void OnStart()
{
AddEntityCollideCallback("Player","scr2","monster",true,1);
AddEntityCollideCallback("jim","scr1","monsterend",true,-1);
AddEntityCollideCallback("Player", "push", "Push", true, 1);
AddEntityCollideCallback("Player", "scr_slam", "func_slam", true, 1);
AddEntityCollideCallback("Player", "KillTheLights", "LightsOut", 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);
GiveSanityDamage(10.0f, true);
StartPlayerLookAt("servant_brute_1",15,15,"");
AddTimer("monstertimer",2,"monstertimer");
ShowEnemyPlayerPosition("servant_brute_1");
PlayGuiSound("react/react_pant3.ogg",10.0f);
StartScreenShake(0.1f,2,0,0.6);
}


void monstertimer(string &in asTimer)
{
StopPlayerLookAt();
}

void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_2", true, true);
StartScreenShake(0.1f,2,0,0.3);
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);
}

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

void LightsOut(string &in asParent, string &in asChild, int alState)
{
SetLampLit("lamp_1", false, true);
AddTimer("", 1, "Out2");
}


void Out2(string &in asTimer)
{
SetLampLit("lamp_2", false, true);
AddTimer("", 1, "Out3");
}


void Out3(string &in asTimer)
{
SetLampLit("lamp_3", false, true);
AddTimer("", 1, "Out4");
}


void Out4(string &in asTimer)
{
SetLampLit("lamp_4", false, true);
AddTimer("", 1, "Out5");
}


void Out5(string &in asTimer)
{
SetLampLit("lamp_5", false, true);
AddTimer("", 1, "Out6");
}


void Out6(string &in asTimer)
{
SetLampLit("lamp_6", false, true);
AddTimer("",1,"Out7");
}

void Out7(string &in asTimer)
{
SetLampLit("lamp_7", false, true);
AddTimer("", 1, "Out8");
}


void Out8(string &in asTimer)
{
SetLampLit("lamp_8", false, true);
AddTimer("", 1, "Out9");
}


void Out9(string &in asTimer)
{
SetLampLit("lamp_9", false, true);
AddTimer("", 1, "Out10");
}


void Out10(string &in asTimer)
{
SetLampLit("lamp_10", false, true);
AddTimer("", 1, "Out11");
}


void Out11(string &in asTimer)
{
SetLampLit("lamp_11", false, true);
AddTimer("", 1, "Out12");
}


void Out12(string &in asTimer)
{
SetLampLit("lamp_12", false, true);
AddTimer("",1,"Out13");
}

void Out13(string &in asTimer)
{
SetLampLit("lamp_13", false, true);
AddTimer("", 1, "Out14");
}

void Out14(string &in asTimer)
{
SetLampLit("lamp_14", false, true);
}
06-25-2013, 06:03 AM
Find


Messages In This Thread
Need help with script error - by liquiddr3amz - 06-25-2013, 06:03 AM
RE: Need help with script error - by Icaab2607 - 06-25-2013, 06:27 AM
RE: Need help with script error - by liquiddr3amz - 06-25-2013, 06:29 AM



Users browsing this thread: 1 Guest(s)