I'm having a problem getting a key to open a door, can you please help?
waterworks_door=Door
waterworks_key=Key
Here is the script:
void OnStart()
{
AddUseItemCallback("", "waterworks_key", "waterworks_door", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("waterworks_door", false, true);
PlaySoundAtEntity("", "unlock_door", "waterworks_door", 0, false);
RemoveItem("waterworks_key");
}
note: I have more script than this but it is working fine.
Thanks