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 Chest unlocked by a key [Solved]
ethics Offline
Member

Posts: 51
Threads: 18
Joined: Jan 2014
Reputation: 0
#1
Chest unlocked by a key [Solved]

So i've seen in other custom stories you need to find a key to unlock a chest, which contains something you need.

I couldn't manage to get a script working for this case, my assumption would be this:

void OnStart()
{
SetLeverStuckState("chest", true, true);
AddUseItemCallback("", "keyy5", "chest", "unlockchest", true);
}

void unlockchest(string &in asItem, string &in asEntity)
{
SetLeverStuckState("chest", false, true);
RemoveItem("keyy5");
}

But whenever I start the map, I get the error shown in the picture.

Can anyone help me?


Attached Files
.png   fatal.PNG (Size: 13.14 KB / Downloads: 111)

(This post was last modified: 05-10-2014, 10:31 AM by ethics.)
02-03-2014, 11:35 AM
Find


Messages In This Thread
Chest unlocked by a key [Solved] - by ethics - 02-03-2014, 11:35 AM
RE: Chest unlocked by a key - by ethics - 02-15-2014, 08:37 PM



Users browsing this thread: 1 Guest(s)