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:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why is the key to door script not working to me?
Wolfpa Offline
Junior Member

Posts: 14
Threads: 3
Joined: Aug 2013
Reputation: 0
#1
Why is the key to door script not working to me?

I tried to do everything but it just won't unlock the damn door!
This is my script:

void OnStart()
{
AddUseItemCallback("", "key", "locked_door1", "UsedKeyOnDoor", true);
SetEntityCallbackFunc("key", "OnPickup");
}
void UsedKeyOnDoor("key", "locked_door1")
{
SetSwingDoorLocked("locked_door1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "locked_door1", 0, false);
RemoveItem("key");
}
void OnPickup(string &in asEntity, string &in type)
{
    SetEntityActive("servant_grunt_1", true);
    ShowEnemyPlayerPosition("servant_grunt_1");
}

Just pls tell me what is wrong or missing!
(This post was last modified: 08-07-2013, 07:20 AM by Wolfpa.)
08-04-2013, 10:38 AM
Find


Messages In This Thread
Why is the key to door script not working to me? - by Wolfpa - 08-04-2013, 10:38 AM



Users browsing this thread: 2 Guest(s)