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
Don't need to use the key on door?
CapnJimmy Offline
Junior Member

Posts: 9
Threads: 2
Joined: Jan 2011
Reputation: 0
#1
Don't need to use the key on door?

Hi, just encountered something odd.

Once I pick up the key the door unlocks without using the key on it.

Here's how the script is laid out:

void OnStart()
{
AddUseItemCallback("", "Key1", "Door_1", "KeyOnDoor", true);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Door_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "Door_1", 0.0f, true);
}

The Item entities are:

Key_1:-
CallbackFunc:
KeyOnDoor

ConnectedProps:
Door1

and Door_1:-
CallbackFunc:
KeyOnDoor

ConnectedProps:
Key1
(This post was last modified: 01-26-2011, 06:18 PM by CapnJimmy.)
01-25-2011, 06:17 PM
Find


Messages In This Thread
Don't need to use the key on door? - by CapnJimmy - 01-25-2011, 06:17 PM



Users browsing this thread: 1 Guest(s)