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
Can't get unlock door with key code to work?
Storfigge Offline
Member

Posts: 101
Threads: 31
Joined: Sep 2012
Reputation: 0
#1
Can't get unlock door with key code to work?

Hey I've been working on my CS for quite a while now and I'm very close to finishing it so i was making a locked door which a key would be required to open it, I've done this like 4 times before and it has worked... Now it doesn't work. When I use the key it says "Cannot use item this way". I have put in all the code and saved everything I've checked for a mistake many times but can't seem to figure it out. I'm using a sewer_arched door named "water_door" and a key_ laboratory named "key5". I'm not very good with programming though I have solved most problems I've had.

Here's the code

{
AddUseItemCallback("", "key5", "water_door", "UsedKeyOnDoor5", true);
}

void UsedKeyOnDoor5(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("water_door", false, true);
PlaySoundAtEntity("", "unlock_door", "water_door", 0, false);
RemoveItem("key5");
}

Really appreciate if someone could tell me what I've done wrong, thx!

(This post was last modified: 11-12-2012, 10:18 AM by Storfigge.)
11-12-2012, 10:17 AM
Find


Messages In This Thread
Can't get unlock door with key code to work? - by Storfigge - 11-12-2012, 10:17 AM



Users browsing this thread: 1 Guest(s)