Can't Create Locked Door

Darkweaver
23 Sept 2014, 21:11
Okay, I'm new at this and trying this in the GUI itself.

I can't seem to keep a gate locked. I followed all the tutorial instructions on containers and it still does not work.

So, you need a "key" to unlock the gate.

So here is what I did as per tutorial on locked containers.

- I created the object "gate" and the exit is called "gate exit".

- The "gate" is a Closed Container. I have it "Locked" and with the object required as "key".

- For "gate exit" I have "Locked" checked.

Yet, when you get to the gate, you can still unlock it without the key. What am I doing wrong?

Here's a couple screen grabs to help simplify what I mean.

Gate: http://i.imgur.com/K8iyc8X.png
Gate Exit: http://i.imgur.com/ItPx6XC.png

Silver
23 Sept 2014, 21:36
There's people who can give better advice than me but for starters I wouldn't set an exit as a container.

Have you explored using flags yet? It can get a bit complicated but you can do so much.

You can set gate flag as closed. When closed, exit isn't created. When key is used you remove flag closed and create exit. You can change the object descriptions based on the flag.

Silver
23 Sept 2014, 21:38
Don't forget that you have to then set object descriptions based on the flag also.

so it will tell you whether the gate is open or closed when you look at it. You run a script rather than print a text.

HegemonKhan
24 Sept 2014, 02:19
we got another thread on this, use Jay's post, not mine, lol:

viewtopic.php?f=10&t=4588

hope this thread helps, if not let us know and we'll help you.

-------

'use' (key) on (gate) scripting:

if (gate.locked = true) {
gate.locked = false
exit_name.locked = false
msg ("You unlock the gate.")
} else if (gate.locked = false) {
gate.locked = true
exit_name.locked = true
msg ("You lock the gate."
}