Frictional Games Forum (read-only)
[HELP] Padlocks - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [HELP] Padlocks (/thread-16822.html)



[HELP] Padlocks - himynamebob1 - 07-08-2012

I've got a padlock ready to operate on a door, but I don't know where to start!


RE: [HELP] Padlocks - heyitsrobert97 - 07-08-2012

(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();
}



RE: [HELP] Padlocks - himynamebob1 - 07-08-2012

Ahhh, okay thank you.