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 Script help
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#1
Script help

whats wrong i get error at row 3 :S


void OnStart()
{
AddUseItemCallback("", "hollow_needle_1", "Locked_door", "NeedleOnDoor", true);
AddUseItemCallback("", "Key_1", "Loocked_door_3", "KeyOnDoor1", true);
AddUseItemCallback("", "Key_2", "door5", "KeyOnDoor2", true);
AddUseItemCallback("", "Key", "locked_door_1", "KeyOnDoor", true);
AddEntityCollideCallback("Player", "Horror_Barrel", "HorrorBarrel", true, 1);
AddEntityCollideCallback("Player", "MusicStart_1", "Music1", true, 1);
AddEntityCollideCallback("Player", "Event_1", "Horror_Event1", true, 0);
AddEntityCollideCallback("Player", "grunt_spawn", "MonsterFunction", true, 1);
AddEntityCollideCallback("grunt", "remove_grunt", "RemoveMonster", true, 1);
AddEntityCollideCallback("Player", "door_slam", "DoorSlam", true, 1);
SetEntityPlayerInteractCallback("PuzzleOne", "PuzzleOnInteract", true);
SetEntityPlayerInteractCallback("Note_Scream2", "HeadLess", true);
SetEntityPlayerInteractCallback("Note_Scream", "Sound1", true);
SetEntityPlayerInteractCallback("Note_Lost2", "Sound2", true);
SetLocalVarInt("Var1", 0);
SetEntityPlayerInteractCallback("button_simple_1", "func1", true);
SetEntityPlayerInteractCallback("button_simple_2", "func2", true);
SetEntityPlayerInteractCallback("button_simple_3", "func3", true);
SetEntityPlayerInteractCallback("button_simple_4", "func4", true);
SetEntityPlayerInteractCallback("candlestick01_1", "Lighter", true);
}
void KeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door5", false, true);
PlaySoundAtEntity("", "unlock_door", "door5", 0, false);
RemoveItem("Key_2");
}
void KeyOnDoor1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Loocked_door_3", false, true);
PlaySoundAtEntity("", "unlock_door", "Loocked_door_3", 0, false);
RemoveItem("Key_1");
}
void Sound2(string &in asEntity)
{
PlaySoundAtEntity("", "Get the fuck our or you will die!.snt", "Player", 0.0f, false);
AddTimer("T2", 4, "Timer2");
}
void Timer2(string &in asTimer)
{
SetMessage("Message", "Wtf", 0);
}
void Lighter(string &in asEntity)
{
SetEntityActive("PointLight_1", true);
}


void RemoveMonster(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt", true);
}

void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt", true);
AddEnemyPatrolNode("grunt", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("grunt", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("grunt", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("grunt", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("grunt", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("grunt", "PathNodeArea_6", 0, "");

}
void DoorSlam(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);
}
void func1(string &in asEntity)
{
AddLocalVarInt("Var1", 1);
func5();
}

void func2(string &in asEntity)
{
AddLocalVarInt("Var1", 1);
func5();
}

void func3(string &in asEntity)
{
AddLocalVarInt("Var1", 1);
func5();
}

void func4(string &in asEntity)
{
AddLocalVarInt("Var1", 1);
func5();
}

void func5()
{
if(GetLocalVarInt("Var1") == 4)
{
/////add what ever you want to happen after you press all 4 buttons here.
SetLevelDoorLocked("door1", false);
PlaySoundAtEntity("", "unlock_door.snt", "door1", 0.5f, false);
}
}

void HeadLess(string &in asEntity)
{
SetEntityActive("headless", true);
PlaySoundAtEntity("", "24_iron_maiden.snt", "Player", 0, false);
}

void Sound1(string &in asEntity)
{

PlaySoundAtEntity("", "15_prisoner_scream.snt", "Player", 0.0f, false);
PlaySoundAtEntity("", "scare_breath.snt", "Player", 0.0f, false);
}

void PuzzleOnInteract(string &in asEntity)
{
AddTimer("T1", 4, "Timer1");
}
void Timer1(string &in asTimer)
{
SetMessage("Message", "PuzzleMessage", 0);
}
void NeedleOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Locked_door", false, true);
PlaySoundAtEntity("", "unlock_door", "Locked_door", 0, false);
RemoveItem("hollow_needle_1");
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("locked_door_1", false, true);
PlaySoundAtEntity("", "unlock_door", "locked_door_1", 0, false);
RemoveItem("Key");
}
void HorrorBarrel(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("HorrorBarrel", true);
PlaySoundAtEntity("HorrorBarrel", "24_iron_maiden.snt", "Player", 0, false);
AddPropForce("HorrorBarrel", 20000, 0, 0, "world");
}

void Music1(string &in asParent, string &in asChild, int alState)

{
PlayMusic("ambience_voice.ogg", true, 0.8f, 1, 0, true);
}

void Horror_Event1(string &in asParent, string &in asChild, int alState)

{
SetEntityActive("box", true);
AddPropImpulse("box", 0, 0, 200, "world");
PlaySoundAtEntity("", "03_wind.snt", "Player", 0.0f, false);
}
void OnLeave()
{

}

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
04-07-2012, 12:55 PM
Website Find


Messages In This Thread
Script help - by jessehmusic - 04-07-2012, 12:55 PM
RE: Script help - by SilentStriker - 04-07-2012, 12:59 PM
RE: Script help - by jessehmusic - 04-07-2012, 01:03 PM
RE: Script help - by Cranky Old Man - 04-07-2012, 01:33 PM



Users browsing this thread: 1 Guest(s)