Frictional Games Forum (read-only)

Full Version: [HELP] Padlocks
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've got a padlock ready to operate on a door, but I don't know where to start!
(07-08-2012, 05:53 AM)himynamebob1 Wrote: [ -> ]I've got a padlock ready to operate on a door, but I don't know where to start!
Is it on the gate like in prisonbase or something like that with the space for the lock?
You can just carefully position it by turning snapgrid off in editor and slowly putting it into place.
Then duplicate the padlock and pull it forward so its out of the lock and set it inactive. then lock the door and when you need to open it (like with a key)

{
AddUseItemCallback("", "key", "door", "unlockdoor", true);
AddUseItemCallback("", "key", "padlock", "unlockdoor", true);

}

void unlockdoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "door", 0.0f, false);
SetEntityActive("padlock", false);
SetEntityActive("padlock_1", true);
GiveSanityBoost();
}
Ahhh, okay thank you.