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
Help what is wrong in my script
EpicLisbe Offline
Junior Member

Posts: 13
Threads: 4
Joined: Dec 2011
Reputation: 0
#1
Help what is wrong in my script

So i am working on a customstory project and when i use key_1 it also unlocks the prisondoor can you help me?


void OnStart()
{
AddUseItemCallback("", "key_1", "monsterdoor_1", "UsedKeyOnDoor", true);
SetEntityCallbackFunc("key_1", "OnPickup");
AddEntityCollideCallback("Player", "Scriptarea_1", "func_bam", true, 1);
AddUseItemCallback("", "rust_1", "prisondoor_1", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
AddEntityCollideCallback("Player", "banish", "BanishFunction", true, 1);

}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("monsterdoor_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "monsterdoor_1", 0, false);
RemoveItem("key_1");


}
void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("servant_grunt_1", true);
ShowEnemyPlayerPosition("servant_grunt_1");
SetSwingDoorLocked("prisondoor_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "prisondoor_1", 0, false);

}


void func_bam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("monsterdoor_1", 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 MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_2", true);
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_5", 0, "");

}
void BanishFunction(string &in asParent, string &in asChild, int alState)

{
SetEnemyDisabled("servant_grunt_2", true);
SetEntityActive("servant_grunt_2", false);
}

12-27-2011, 08:22 PM
Find


Messages In This Thread
Help what is wrong in my script - by EpicLisbe - 12-27-2011, 08:22 PM
RE: Help what is wrong in my script - by Apjjm - 12-30-2011, 03:27 PM



Users browsing this thread: 1 Guest(s)