07-13-2011, 10:39 PM
Hey, Me once again with another problem but it seems easy to fix. Just to hard for me.
Anyways I Have 2 Keys and each key unlocks a different door the problem is when i unlock one door the other one unlocks as well. because I don't know how to separate the code in the script,
I had that first, and it said I cannot use it because that prefix was already being used. So I did this.
But that Didn't work either.
Thank you for helping in Advance
-Grey Fox (The Noob)
Anyways I Have 2 Keys and each key unlocks a different door the problem is when i unlock one door the other one unlocks as well. because I don't know how to separate the code in the script,
Code:
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("LockedDoor_1", false, true);
PlaySoundAtEntity("", "unlock_door", "LockedDoor_1", 0, false);
RemoveItem("LockedDoorKey");
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Door_2", false, true);
PlaySoundAtEntity("", "unlock_door", "Door_2", 0, false);
RemoveItem("Key_2");
}
I had that first, and it said I cannot use it because that prefix was already being used. So I did this.
Code:
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("LockedDoor_1", false, true);
PlaySoundAtEntity("", "unlock_door", "LockedDoor_1", 0, false);
RemoveItem("LockedDoorKey");
SetSwingDoorLocked("Door_2", false, true);
PlaySoundAtEntity("", "unlock_door", "Door_2", 0, false);
RemoveItem("Key_2");
}
But that Didn't work either.
Thank you for helping in Advance
-Grey Fox (The Noob)