GSphoenix
Junior Member
Posts: 2
Threads: 0
Joined: Sep 2012
Reputation:
0
|
RE: How to unlock door with key?
////////////////////////
//Run when Starting map
void OnStart()
{
AddUseItemCallback("", "OfficeKey", "mansion_1", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, false);
RemoveItem("OfficeKey");
AddDebugMessage("KeyOnDoor", false);
}
////////////////////////
//Run when Entering map
void OnEnter()
{
}
///////////////////////
//Run when Leaving map
void OnLeave()
{
}
If I want to use it on the door its says: "cant use this item this way".
maybee the names in the editor are wrong, but i dont no with one...?
|
|
09-26-2012, 05:47 PM |
|