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 Im sure this is easier than i am making it...
kevinsme2005isme13 Offline
Junior Member

Posts: 2
Threads: 1
Joined: Jul 2012
Reputation: 0
#1
Im sure this is easier than i am making it...

Please help! I have an error when i run my custom map. Its in the last line and character of this script, and i cant figure it out, please point me in the right direction. Thank you in advance!

////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "key_1", "door_1", "KeyOnDoor", true);
AddUseItemCallback("", "key_cabinet_1", "cabinet_1", "KeyOnDoor2", true);
AddUseItemCallback("", "exitkey_1", "exitdoor_1", "KeyOnDoor3", true);
AddUseItemCallback("", "exitkey_2", "exitdoor_2, "KeyOnDoor4", true);
AddUseItemCallback("", "exitkey_3", "exitdoor_3", "KeyOnDoor5", true);
AddEntityCollideCallback("Player", "ScriptArea_1", "MonsterFunction1", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "MonsterFunction2", true, 1);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door_1", false, true);
PlaySoundAtEntity("", "unlock_door", "door_1", 0, false);
RemoveItem("key_1");
}

void KeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("cabinet_1", false, true);
PlaySoundAtEntity("", "unlock_door", "door_1", 0, false);
RemoveItem("key_cabinet_1");
}

void KeyOnDoor3(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("exitdoor_1", false, true);
PlaySoundAtEntity("", "unlock_door", "exitdoor_1", 0, false);
RemoveItem("exitkey_1");
}

void KeyOnDoor4(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("exitdoor_2", false, true);
PlaySoundAtEntity("", "unlock_door", "exitdoor_2", 0, false);
RemoveItem("exitkey_2");
}

void KeyOnDoor5(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("exitdoor_3", false, true);
PlaySoundAtEntity("", "unlock_door", "exitdoor_3", 0, false);
RemoveItem("exitkey_3");
}

void MonsterFunction1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("enemy_1", true);
SetSwingDoorLocked("trapdoor_1", true, true);
}

void MonsterFunction2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("enemy_2", true);
SetSwingDoorLocked("trapdoor_1", true, true);
}
////////////////////////////
//Run when entering map
void OnEnter()
{

}

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

}
07-31-2012, 05:13 AM
Find


Messages In This Thread
Im sure this is easier than i am making it... - by kevinsme2005isme13 - 07-31-2012, 05:13 AM



Users browsing this thread: 1 Guest(s)