Hello!
I am very new with HPL editor and im working on my first custom story. I have no real coding experience but it's gone quite good so far. The problem I have right now is that i first made a locked door and managed to create a key that opens it. Now I've made a new locked door with a key that's suppose to open it. The thing is that when i unlock my first door the second one also unlocks. I can still use my second key on my second unlocked door. I've put the door on locked in the editor so I don't know what the problem is
Here is the code for the doors.
{
AddUseItemCallback("", "key1", "bedroomdoor1", "UsedKeyOnDoor", true);
AddUseItemCallback("", "key2", "bedroomdoor2", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("bedroomdoor1", false, true);
PlaySoundAtEntity("", "unlock_door", "bedroomdoor1", 0, false);
RemoveItem("key1");
SetSwingDoorLocked("bedroomdoor2", false, true);
PlaySoundAtEntity("", "unlock_door", "bedroomdoor2", 0, false);
RemoveItem("key2");
}