Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Gametee


Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How To Lock a Chest?
Author Message
theDARKW0LF Offline
Member

Posts: 150
Joined: Sep 2010
Reputation: 0
Post: #1
How To Lock a Chest?

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

Check out my custom stories(1)(2)!
09-17-2010 08:27 AM
Find all posts by this user Quote this message in a reply
jens Offline
Frictional Games

Posts: 4,095
Joined: Apr 2006
Reputation: 202
Post: #2
RE: How To Lock a Chest?

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.
09-17-2010 08:33 AM
Visit this user's website Find all posts by this user Quote this message in a reply
theDARKW0LF Offline
Member

Posts: 150
Joined: Sep 2010
Reputation: 0
Post: #3
RE: How To Lock a Chest?

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

Check out my custom stories(1)(2)!
09-17-2010 08:38 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)