01-25-2011, 06:17 PM
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
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