1 working key, 1 unworking
I have tried alot of things to get the 2nd key to work, but i can't semm to fix it. here is my hps file:
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "BedroomKey", "mansion_1", "KeyOnDoor", true);
AddUseItemCallback("", "StorageRoomKey", "mansion_2", "Door", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("BedroomKey");
}
void Door(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_2", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_2", 0, false);
RemoveItem("StorageRoomKey");
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
what am I doing wrong?
|