Storfigge
Member
Posts: 101
Threads: 31
Joined: Sep 2012
Reputation:
0
|
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 |
|