Keypad

ShenTraXShenTraX Join Date: 2003-11-10 Member: 22434Members, Constellation
<div class="IPBDescription">lemmie borrow your brain...</div> Sorry, for ascii art... crude but effective:

|-------------|
| 1 2 3 4 |
| 5 6 7 8 |
| 9 0 ENT |
|------------ |

multisource
name=correct_answer (we'll call it COR)

multisource (x6)
name=incorrect (we'll call it IN)


now, for simplicity sake, lets say 1,2,3,4 is the combination we want
func_button func_button func_button
name=one name=five name=nine
target=COR target=IN target=IN5

func_button func_button func_button
name=two name=six name=zero
target=COR target=IN2 target=IN6

func_button func_button
name=three name=seven
target=COR target=IN3

func_button func_button
name=four name=eight
target=COR target=IN4

so... we funnel the incorrects
in taget=in2
in2 target=in3
in3 target=in4
in4 target=in5
in5 target=in6
in6 target=final

this should funnel an incorrection to the final filter, for logic sake, the state are inversed for the incorrect answers:
e.g. if you bush button nine
(five=on)->(six=on)->(seven=on)->(eight=on)->(nine=off)->(zero=off)->final
or if you push button six
(five=on)->(six=off)->(seven=off)->(eight=off)->(nine=off)->(zero=off)->final
should pass an 'off' state to 'final'

multisource
name=final
target=(the desired action of the correct answer)
---
children=
(zero)
(COR)

so if COR=ON and zero=on it will activate
if COR=ON and zero=off, it wont... and same if COR=off

Theoretical?

or is their a simpler way?

Comments

  • ShenTraXShenTraX Join Date: 2003-11-10 Member: 22434Members, Constellation
    maybe this crayon sketch will help...
  • OlmyOlmy Join Date: 2003-05-08 Member: 16142Members, NS1 Playtester, Contributor, NS2 Developer, NS2 Map Tester, Reinforced - Diamond
    my brain is on fire, stop the burning!! <!--emo&???--><img src='http://www.unknownworlds.com/forums/html//emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif' /><!--endemo-->
  • Lt_GravityLt_Gravity Join Date: 2003-04-28 Member: 15909Members
    and... what is it good for?<!--emo&???--><img src='http://www.unknownworlds.com/forums/html//emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif' /><!--endemo--><!--emo&???--><img src='http://www.unknownworlds.com/forums/html//emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif' /><!--endemo-->??
  • ShenTraXShenTraX Join Date: 2003-11-10 Member: 22434Members, Constellation
    thats a secret... <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->
  • YamazakiYamazaki Join Date: 2002-01-24 Member: 21Members, NS1 Playtester, Contributor
    Simplest method I can think of requires you to limit the combination to no repeating numbers (ie. 1234 is good but not 1212).

    Make an empty room, in this empty room you set up an env_beam that's aiming at a func_button. The beam causes damage, and the button reacts to damage. In the path of the beam is four func_doors, which act as the logical gates of this system.
    You also need three env_globals and three multisources in order to set up a state storing system. You want three states, for digits 1 - 3, and they all start off False.

    Door 1 is for digit one, it opens when triggered.
    Door 2 is for digit two, it opens when triggered if masterdigit1 is ON.
    Door 3 is for digit three, it opens when triggered if masterdigit2 is ON.
    Door 4 is for digit four, it opens when triggered if masterdigit3 is ON.

    So if you try to trigger these in the wrong order you'll end up with doors staying closed, which will prevent the beam from hitting the target at the end.

    You also need a trigger_count to keep track of how many times you've pushed keys, so that the fourth keypress triggers a multimanaer that resets everything back to its original state. You'll need extra entities that handle the resets for the doors and globals.
  • ReebdoogReebdoog Join Date: 2003-09-20 Member: 21035Members
    <!--QuoteBegin-Lt.Gravity+Feb 13 2004, 04:45 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Lt.Gravity @ Feb 13 2004, 04:45 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->and... what is it good for?<!--emo&???--><img src='http://www.unknownworlds.com/forums/html//emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif' /><!--endemo--><!--emo&???--><img src='http://www.unknownworlds.com/forums/html//emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif' /><!--endemo-->??<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
    War! huh-yeah. What is it good for? Absolutely nothing. Uh-huh
    War! huh-yeah. What is it good for? Absolutely nothing. Say it again y'all
    War! huh good God. What is it good for? Absolutely nothing. Listen to me?

    Just some useless rambling of an old mind....
    btw im trying to think of a more logical way for it to work using ns entities...
  • XythXyth Avatar Join Date: 2003-11-04 Member: 22312Members
    Here's how I would do it (might be the same way but oh well)
    lets say the correct code is 1,2,3,4.
    Each red box stands for a laser that fires in the direction of the arrow when the number underneith the lser is pressed.
    Each of the green boxes is a func breakable that has the effect of targetting a multi on death, so if one dies the whole the shuts down. Each of the blue boxes represents a wall that moves into place when the number underneith it is pressed.
    And the last blue box on the far right moves down the the button 4 is pressed thusly allowing the laser that is turned on when button 1 was pressed to destroy the pink box which is a function breakable that targets and opens a door.
    So lets use a scenario. You push button 1, which is the correct first button press, the laser at the end is turned on but is being blocked by wall #4, and wall #1 is moved into place blocking Func_breakable #2. You then push button #2, which switches on laser #2 and moves wall #2 into place blocking func_breakable #3. But now lets say you press button #4 instead of button #3. This activates laser #4 which fires forward and hist func_breakable #4 which has not been yet protected by wall #3. This destroys breakable #4 and you loose. Also the final door breakable must must have a bit of health so if you push button #1 then immdiatly push #4, breakable #4 is killed before the final breakable breaks.

    If you give me a little while ill make a map that does this and allow you to see the "lock mechanism"
    ex.jpg 14.6K
  • XythXyth Avatar Join Date: 2003-11-04 Member: 22312Members
    Okay done, PM me if you'd like to see it. It looks really cool and works perfect.
  • brute_forcebrute_force Join Date: 2003-10-04 Member: 21433Members, Constellation
    Post it on the forums? Would be cool to see. <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->
  • XythXyth Avatar Join Date: 2003-11-04 Member: 22312Members
    Here, .rmf and .bsp are in there
  • ShenTraXShenTraX Join Date: 2003-11-10 Member: 22434Members, Constellation
    edited February 2004
    Well, not quite what i was looking for, BUT you did inspire me Xyth.

    Here is a sample using the technique that Xyth used.

    This example uses 10 switches, hence the 0,1,2,3,4,5,6,7,8,9 keypad,

    notice that 1,2,3,4 are closed, and the 5-0 are 'start open'

    if any are closed it wont allow the laser to trigger the button at the end, which is a 'shoot open' button and the laser does 100 damage, with the target_info inside.

    so if any of the wrong combinations aer used, it wont light.
  • ShenTraXShenTraX Join Date: 2003-11-10 Member: 22434Members, Constellation
Sign In or Register to comment.