Keypad with repeating numbers

Discussion in 'Mapping Questions & Discussion' started by 【EmNudge】, Aug 3, 2017.

  1. 【EmNudge】

    【EmNudge】 L4: Comfortable Member

    Messages:
    179
    Positive Ratings:
    35
    I'd like to have a keypad in a map of mine as an easter egg. The setup isn't too crazy:
    • I have the 2fort keypad model from sfm_beta
    • there's a func_button for each of the 12 buttons on the pad. The star symbol resets the pad and the hash/pound symbol enters it.
    • I also have 3 ambient_generics and a logic_relay. The sounds are for a press, error, and success. The relay is if the code is entered correctly.
    • Each button plays a sound when pressed, whether locked or not. Only the first button in the code starts unlocked. When a locked button is pressed the logic_relay is locked.
    • star and pound enable the relay. The pound symbol will first try to trigger it though.
    • the first button in the code will unlock the next button and lock itself and that one will do the same, etc.
    • if the pound button is pressed and it is locked, it will play an error sound.
    With this, the player can hit random buttons and only find out if he got something wrong once he's done and hits pound. If the player messed up somewhere then the mess-up button would have locked the logic_relay, so if there was a mess-up, but the code was entered after that there will be no error sound, but no success sound.

    Now hopefully you've followed thus far. My problem is that this method doesn't allow me to have a button hit multiple times in a row or even more than once in the sequence. The code I have in mind has 6 twice in a row and 3 scattered 3 times.


    If it helps, here is a picture. Also, I know that you can use AddOutput to give a specific number of uses to an output, so there's that. I just don't know exactly how that would help me.
    [​IMG]
     
  2. henke37

    aa henke37

    Messages:
    1,836
    Positive Ratings:
    420
    Use a math_counter and some logic compares to track the progress instead.
     
    • Agree Agree x 2