Frictional Games Forum (read-only)

Full Version: How To Lock a Chest?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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.
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