Codelock puzzle for your monuments

im_the_new_guy

New member
Hi all,

Made a code lock puzzle for one of my maps and thought I would share it with the community.

You press the red buttons, increasing the count on the counters until it reaches 10, where it is set back to 0.

It uses 3 counter entities per lock and can be easily expanded. Also has an auto reset timer which will set the numbers back to 0 upon a successful entry.

qEgTnRa.png

Gpef4RE.png

g4McLda.png


I will explain it a little below:

RE pic:
eH8T4hr.png


Red box: logic for each of the press buttons/display. There are 3 counters required per lock: The display counter, the code counter and the code counter+1. Since counters have a pass through if the value is >= the target number, the code counter + 1 powers a blocker, preventing pass through from the code counter. You can change the code to anything you want, so long as it is < 10. Change the code counter+1 to be 1 above the code counter.
There is also a timer with a 1 second delay on each. This prevents the counter from passing its power through when being reset (moving from 9 to 0), as there is a short period where power is passed, even if the blocker and counter is reset at the same time.

Green box: these are AndSwitches that feed the results from the counters into the final I.O piece. Plug whatever you want your successful code to trigger from the top ANDSwitch.

Blue box: These are the buttons to input the code, and the display counters themselves. They are behind a layer of glass so players cannot adjust the counters from the outside. These counters have a target of 10, and will reset the code to 0 if that number is achieved. There is also a 2 second delay on each button press so the timer doesnt get out of sync, and to prevent brute force code breaking.

Purple box: This is the reset sequence for the puzzle. Upon successfully entering the puzzle, the timer will trigger and count down, increasing the count of the counter from 0 to 1 (1 being the pass through target). It will also feed into the blocker to prevent pass through from the counter while the timer is active. Once the timer finishes, it will allow pass through and will set the counters back to 0.

The beauty of this prefab is that it can be changed very easily in RustEdit and in game (with no clip), and provides your players with another interactive puzzle outside of the normal swipe cards and switches.

Hope you all enjoy!

Prefab download: https://www.dropbox.com/s/w433x4s872tyvf0/PinButtonTest9.map?dl=1
 
Last edited:
Top