Frictional Games Forum (read-only)
How To Lock a Chest? - 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 (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: How To Lock a Chest? (/thread-4465.html)



How To Lock a Chest? - theDARKW0LF - 09-17-2010

I'm baaaack! Big Grin And before you finish the sentence for me, Yes! I have run into another scripting issue! Rolleyes
Well, maybe not an "issue", but a "roadblock" in my level design that involves a script. /end rambling

ANYWAYS, as you can see from the topic, I need to know how to lock a chest. As they are not like doors where you can check in that handy little box to lock it, I am assuming you need to script it in, and that's where you come in! Hilfe! Please? Wink


RE: How To Lock a Chest? - jens - 09-17-2010

SetLeverStuckState("name_of_lever", 1, false); I think it is 1, it could be -1. 1 is either that the chest will be "locked closed" or it will be "locked open" so if it is open, then change to -1 instead.

Yes, the chests are actually levers so you have to fake a little bit to make them behave like locked doors.


RE: How To Lock a Chest? - theDARKW0LF - 09-17-2010

Ok, I'll try it out, thanks for your quick response! And might I say what an amazing game you guys have made, it's just so different from the rest, in a good way! Wink

EDIT: Lol, I feel so stupid, but what exactly do I enter the string under?

EDIT2: Oops, nevermind, I keep forgetting about the all-important "OnStart". Tongue

EDIT3: Yeah 1 makes it stuck open, so -1 must be to keep it stuck closed. Thanks again