08-05-2012, 05:05 PM
Hello everybody,
I have a key called Bedroomkey and a leveldoor called Bedroomlevel. Now I have this script:
I can here the unlock_door sound and the Bedroomkey is gone from my inventory but the door is not unlocked :/ How can I fix this?
Luke
I have a key called Bedroomkey and a leveldoor called Bedroomlevel. Now I have this script:
PHP Code:
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Bedroomlevel", false, true);
PlaySoundAtEntity("", "unlock_door", "Bedroomlevel", 0, false);
RemoveItem("Bedroomkey");
}
I can here the unlock_door sound and the Bedroomkey is gone from my inventory but the door is not unlocked :/ How can I fix this?
Luke