Author Topic: How do I make a coded door?  (Read 968 times)

I'm working on a spy base that will include; a restaurant "disguise", a hidden switch to open the wall to base, a few coded doors(why I'm making topic), a zombie testing facility, a room full of weapons, a cafeteria, a bar, and much, much more...

Anyway, I'm making this topic to ask someone, anyone, how to make a door that will require someone to enter a code to make it open... Example below.


[Non-Base member]*walking down a long hall*
......
*see a big set of door's and a pad of numbers*
[Non-Base member]*thinking*Hmm...whats this for?
[Non-Base member]*hits 4-7-2-5 in the number pad*
*green gas fills the hall and a wall appears behind the poor civilian blocking his escape*
[Non-Base member]NOOOOOOOOOOOOOO*chokes on poison gas and falls down and dies*


...Well......got any events that can make the happen?

Maybe make it so there is a positive thing for entering the correct code, and a negative thing for entering the incorrect code?

I think someone made one of these with a changable code buttons thing, which was quite cool.

If its a save I don't want it I just want a tutorial...for some reason I can never get saves to work right...

Well, there's a lot of ways you could do it. Print counts, variables, setEventEnabled buttons, etc.

Tutorial?...+links for events?


There are password events, One sec I'll go find the link



but i want a full number pad and everything...not just a brick with a password event...

but i want a full number pad and everything...not just a brick with a password event...
then use variables


For the sake of time I am using only 4 buttons, but the same goes for more.
The code will be 132 (creative, huh?)
EVENTS FOR #1:
Check>0>onActivate>NamedBrick>3>setEventEnabled>0 1>1
Check>0>onActivate>Self>SetEventEnabled>0 1>0
EVENTS FOR #2:
NoCheck>0>onActivate>namedBrick>1>setEventEnabled>0 1>1
NoCheck>0>onActivate>NamedBrick>Door>DoorOpen
NoCheck>0>onActivate>Self>setEventEnabled>0 1 2>0
EVENTS FOR #3:
NoCheck>0>onActivate>NamedBrick>2>setEventEnabled>0 1 2>1
NoCheck>0>onActivate>self>setEventEnabled>0 1>0
EVENTS FOR #4:
Check>0>onActivate>NamedBrick>1>setEventEnabled>0 1>1
Check>0>onActivate>NamedBrick>2>setEventEnabled>0 1>0
Check>0>onActivate>NamedBrick>3>setEventEnabled>0 1>0

------------WHAT THIS DOES----------------
If you press 132 in order the door opens.
If you press 4 at all it resets so once again you have to press 132.
If you have more buttons, all the ones not used get the same events as #4.
THIS TUTORIAL DOES NOT INCLUDE SOUNDS/HIGHLIGHTING ON CLICK.

I can use variables if you want, I can make the gas work. Set up a server whenever you want, ill help you. IRC me or somethin.

For the sake of time I am using only 4 buttons, but the same goes for more.
The code will be 132 (creative, huh?)
EVENTS FOR #1:
Check>0>onActivate>NamedBrick>3>setEventEnabled>0 1>1
Check>0>onActivate>Self>SetEventEnabled>0 1>0
EVENTS FOR #2:
NoCheck>0>onActivate>namedBrick>1>setEventEnabled>0 1>1
NoCheck>0>onActivate>NamedBrick>Door>DoorOpen
NoCheck>0>onActivate>Self>setEventEnabled>0 1 2>0
EVENTS FOR #3:
NoCheck>0>onActivate>NamedBrick>2>setEventEnabled>0 1 2>1
NoCheck>0>onActivate>self>setEventEnabled>0 1>0
EVENTS FOR #4:
Check>0>onActivate>NamedBrick>1>setEventEnabled>0 1>1
Check>0>onActivate>NamedBrick>2>setEventEnabled>0 1>0
Check>0>onActivate>NamedBrick>3>setEventEnabled>0 1>0

------------WHAT THIS DOES----------------
If you press 132 in order the door opens.
If you press 4 at all it resets so once again you have to press 132.
If you have more buttons, all the ones not used get the same events as #4.
THIS TUTORIAL DOES NOT INCLUDE SOUNDS/HIGHLIGHTING ON CLICK.
how do i make it so the code of 3 1 2 3?

how do i make it so the code of 3 1 2 3?
There might be a way without variables, but variables is your best option. PM me sometime if you want help with variables. (or SeventhSandwich, of course)