This tutorial brilliantly translates abstract Boolean logic into practical sandbox engineering, proving that technical mastery is the ultimate foundation for creative level design. It effectively turns a dry lesson in circuitry into an essential toolkit for sophisticated gameplay.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
Do you want to build a s̶n̶o̶w̶m̶a̶n̶ hiding spot?Added:
What's up, guys? My name is Khan, and today we're back with more Scrap Mechanic. And recently, I've been getting a lot of comments asking me to explain a little bit of logic that you could use to build a hideand-seek map.
So, I've laid out some logic here, and in no particular order, we're going to go through it, and hopefully this helps you guys in terms of making your own maps cuz I know a lot of people have been having some struggles with some maps not working correctly and things like that. And in addition, if you have any other things that I've missed, let me know in the comments down below, and I will be sure to touch them in the next video and to make sure that we cover them if this is something that you guys need. But anyway, I've got a whole bunch of different logic here and uh some really basic stuff. And really there's no particular order. We'll start with some super basic things which are kind of over here and then we'll go to a little bit more complicated memory stuff. But the really basic examples, um I guess the first one would be this one right here. If you are really really new to scrap mechanic, this one we've seen in a few different maps. I thought I would bring it up. Uh when you're setting up a system with like a controller, right? This is like the most basic example of something, but we have a controller going to a door here. We can open and close this door and this door gets stuck. Right? And this is a pretty common problem in Scram Mechanic because the hitbox sucks. So even though I can delete this door and I can put it back as a series of blocks, it gets stuck. Right? Now, there's a solution to that. You could of course make the door a little bit longer. And if the door is long enough, sometimes you can be okay.
But there's no guarantee because of the way scrap mechanic works and physics and the bearing might get offset. It might still get stuck. So the solution if you do run into this problem when you're building a hide-and-seek map, really, really simple. Uh you can put a second door. You can make it just like a little swivel point like that. Right? That works. The other solution you can do as well is like for example, if we go back to this, the door is going to get stuck again, right? So, you can do that. But if you really want to, it's not exactly great cuz it doesn't line up. But if we take concrete wedges for example, we can do this as well. And again, it's not my ideal solution, but this should work.
See, that works as well because now the hit box doesn't hit. But again, you'll see that seam there. So, just options you can do if you want to try and make a door. This is kind of one of the reasons why I use piston doors instead of bearings. But anyway, I have seen this in a few maps, so I figured I would point it out. Another thing I wanted to show you guys is just a basic setup for a hiding spot. Again, these are some really simple things. We're going to go into some more complicated stuff. I'm going to actually build some stuff as well. We'll go through and actually build it step by step so you guys can understand what's happening. But for this stuff, I think it's pretty self-explanatory. Your basic hiding spot, right? You can have a piston.
Again, the piston can open and close.
And we do that just by changing the length on the piston. And both of these switches just go into an XOR gate, right? So you take a logic gate, you set it to XOR, and this works with any number of switches. And basically, whenever you change the state of any one switch, whether you turn it on or off, it will alternate the state of the gate, which in turn will alternate the state of this. So it's a really simple setup if you want to make spots. Now, of course, the unfortunate thing with this is if you make a hiding spot that has this system, then you know your switch is left on, you have to do the thing where you go here and reset the switch and blah blah blah. The other alternate thing you can do as well, if you want a spot to automatically close, same thing.
We have both these going into an XOR gate. XOR gate then goes to a controller. And you can see our controller is set to the length of six, six, and then zero. So now we have a spot that opens, stays open for a bit, and then closes. I personally don't like this. I've seen a few maps that do this where people like to have their hiding spots automatically close after a certain amount of time. If that's what you want, great. And this works again, same as before. You can go to this spot, you click the switch, it'll open, and then it'll close. You click this one, it'll open, and then it'll close. So, there's an option there if you want it.
We'll get back to that in a little bit.
Now, of course, I make my hiding spots much more complicated than that. So, we're going to get into memory because I feel like memory is just the best way to do it. And we can get into some button setups as well. Now, the easiest actually, you know what? Let's go over here for We have no order in this. I just literally figured out a bunch of different things where I was like, these are probably useful things for people to know when they're building hide-and-seek maps. So, I just kind of slapped them all around. Um, yeah, there's no order.
We've done that. Anyway, let's go over here. So, this is the easiest way to make a button spot. I don't do this because it's loud and there's a spud gun, but you can take a sensor. And if you look at sensors, they have all these options, but they have this thing at the one side here, which is a mode that says switch or button. And if you have a sensor set to switch mode, by default, it'll be set to button mode. But if you set your sensor to switch mode, then whenever you go in front of that sensor, it'll activate and it'll stay activated until something else goes in front of it. It's kind of like a toggle instead of just a button. So, this makes for really the easiest button spot. If you really wanted one, you could have this sensor hooked into a piston or a controller or whatever to activate the spot. And then we have all three of these buttons going into this orgate here, which then shoots this spud gun.
So, every time we do this, it just shoots a spud gun and that activates and deactivates the sensor. It's really the easiest setup to do. Anybody like you just put down a spud gun, you have to have a oneb block gap between the spud gun and the sensor. And every time the spud gun shoots, it's essentially shooting one tick at the sensor. And then, you know, we can have that sensor going to a piston, of course. And then that piston here could open our hiding spot, right? We could have this as a piston. This goes to something like that. Whatever. This can be set to, you know, whatever range you want. And of course, that goes right. So, we hit that activates the piston. And again, it closes the spot. So, that's really the easiest setup if you want to do any sort of button spot. And of course, if you want to do a switch spot, it's just an exorate. You know, you can have infinite number of XOR gate or infinite number of switches, sorry, feeding into an Xorgate. And whenever you alternate the state of anyone switch, turn it on or off, the exor gate will change, opens and closes your spot. Really, really simple stuff. If you want to make like really simple hide-and-seek maps and you find all the logic is just too intimidating, first of all, let me know in the comments down below and I'll try to do some more logic tutorials. But this is the easiest way to do it. Now, the only thing you have to watch out for with sensors is that with if you have enough sensors on a map, it will lag because every sensor has to fire out a ray trace. And then, of course, you know, that takes computing power and about I mean, it's like hundreds and hundreds of sensors. But yeah, it could it could start lagging your map if you have too many sensors all on it at the same time. But anyway, you can do it all with logic. So, let's get into that because logic is the best stuff. I I love logic, but you can make really basic maps. So, this is the kind of logic here that I've been doing on my hide-and-seek maps. It's really, really simple stuff. Uh, there's also this nor and and memory logic. I used to do nor or or memory which is well nor or memory and then a friend of mine actually showed me this nor and memory and I just like learned about it a couple days ago and it's kind of awesome. It's really really good stuff and you can use it for all sorts of cool things. It saves a lot of blocks. For example, this and this are the exact same but like this uses way less blocks than that. Anyway, logic memory is good stuff. So, this is XOR memory. Now, triple XOR memory. The convenient thing about it is that it will run on the ticks of the game. So, the game calculates at 40 ticks. If you look at a logic block, um, not that one, but if you look at a timer block, there's 40 ticks per second. So, your logic calculates at one tick per block.
Really, really simple stuff. And then all you got to do is just, you know, have all of these wired together. And so, this allows us to, you know, set and reset, right? No matter what button we press, we can press the same button over again. And again, if we hook this into a piston and we had this on a piston like this and you know, set the piston fast, whatever, that becomes our output. This activates it, deactivates it, right? No matter what, you're just essentially toggling. And any button you press is a toggle. And with this setup, we can take any one of these buttons and hook it into this first green gate here, and they all become toggles, right? So, this is how I do all my spots. I like it because obviously it's all logic. It's very simple. It's also foolproof. Like I can mash this as hard as I want. This will never break. Like that logic will never get into some weird state where it's it's kind of messed up and broken.
We can also add a few gates to the circuit and end up with the same thing, but then it becomes an automatic um spot. So this one is again kind of like the one before where it'll click the button and then it'll auto reset. And if we hit this a million times, it won't go until it auto resets itself. So you can do stuff like that for again if you the people who like these like spots that open and then close automatically. this is how you could do that. Um, and you could have multiple buttons again and it doesn't matter how many times you press them. I'm not a fan of that, but regardless, that's possible. So, let's set this up. And we're going to do it super super slowly so that if you guys are trying to follow along, this is going to be the part where you can follow along and how to set up an XOR memory bit. And it's super easy. I promise. I'm going to lay it out really really big. So, the only things we're going to need for this is logic gates and a button. And if we want to do the self-resetting one, we can have a timer as well. But essentially, we need logic gates and a button. So, the first thing we're going to do is we're going to make a triangle of logic gates. Now, I make them in a line, but I'm going to do this in a triangle so it's really easy to see what we're doing. And we're going to connect the triangle in a loop. So, this one goes to that one, goes to that one, goes back to the first one. So, that's a full loop of logic gates. Now, we're going to take another logic gate and we're going to connect this one as an ore. And this orgate is going to connect to all of these. Now, this isn't necessarily required to have this ORgate. There's other ways around it, but you can include this orgate to make your life just a little bit simpler. Uh, this one, for example, doesn't have that orgate. You can see I connect straight from this and gate out. But we're going to add this orate in just to make everything kind of make more sense. So, we're going to paint these three white.
That's our memory bit. And you'll notice the orgate connects out to all three of them. You can't drag backwards. The logic direction depends on the direction you're dragging. So it's important that you drag from this outwards to each one of those three. And then we need to create a tick generator for our buttons.
So a tick generator is three gates. It's always the same three gates. And it's a norate on the one side. An orgate to feed the start and an endgate. The orgate feeds into the norgate.
So it feeds into this triangle. This is an orgate here. Norate andgate. I know it's a lot of or exor. It's kind of all the same language, but just try and bear with me here. So we connect those into a triangle. The orgate feeds both and then the norate feeds over. And the reason why this matters is essentially we're relying on the fact that the game has a one tick delay per logic block. So when you press this button, this orgate activates which shuts this off but simultaneously sends a pulse through this. And then the pulse of this gets to there which then shuts this off but it's one tick delayed from the fact that this was on. So it sends exactly one tick of on pulse through the system. That's why this works the way it does. And then we feed from this andgate into that orgate.
And so now if we press this, the memory bit turns on and it will stay on forever. All three of those. And if we press it again, it will turn off, right?
Same memory bit. Really simple thing. So if you set that up, really, really easy to do. No problem. And then of course, if you want to do a self-resetting one, you need to add two extra gates to the circuit. One is a norate condition. This prevents you from mashing the button.
So, if we hook the norate into the ANDgate, that means once we press this, it's now stuck on. And no matter how many times I mash the button, I can't toggle it off, which actually sucks cuz now I have to try and flick this just to just I have to get it on the right pulse. Oh, there we go. Okay. And uh and then the second thing we need is the timer itself. And the timer is another really simple one. So, you just take a timer, you take the tick that comes off of this and gate. This is going to send a one tick pulse that activates this.
But then at the same time it's sending that one tick pulse into our timer. Our timer can delay that pulse for however long we want. And then we send that pulse back into the orgate which then feeds the memory bit. So now we've created the self-reset loop where instantly you press the button it sends that one tick pulse up the timer resets right and this is spam proof. Again we can mash this as much as we want. It will always open and then close. So really really simple setup. Again it it seems complicated but watch back through that video. The logic is really really simple. I'll just kind of hold the screen here too just for a second. You can actually see all the arrows. So, if you want to pause the video right now and take a look at how this is wired up, it should be relatively easy to figure out. But there you go. It is a relatively simple system and that gets you through your memory in order to create some spots. Now, one more thing with this system, of course, is you can add as many buttons as you want to this initial orgate. And, you know, it doesn't really matter. So, we can feed like 300 buttons. You know, they're all the same. They all do the same thing. It all works, right? So, now if we go over to this system, this is the second set of memory. This is kind of cool. Again, this is a different set of memory, but it's nor and and memory. It's kind of weird. Now, the cool thing about nor and and memory is you have a set and a reset that are dedicated. So, instead of one button toggling both, like see this one button, I can press it a million times and it only toggles it on and then this button toggles it off. Why you would want that? There's other reasons. You don't necessarily need this for hiding spots on maps, but if you do want this for like doors that you could open and close, for example. Uh I mean, you might want it for a hiding spot, but there is also the self-reset version, of course, where you can press this and then it'll go and it'll self-reset, and it'll actually stay reset for that amount of time. So, even if I spam it, you can see it won't um it'll have to stay reset.
Like, I can hold it and then it has to reset and shut off. So, anyway, it's really cool. The nice thing about this memory, obviously, it's much smaller package. Um, but yeah, it's it's a little bit different to set up. It's just really a simple plus, but we can set that up as well. So, the first thing we're going to do for this is we're going to have basically four logic gates in a square. Um, I can make them a little bit bigger of a square so it's easier to see. And on the top, we have our two ANDgates. And on the bottom, we have two NOR gates. And then really simply, you just connect them up. So, the NORgate goes across this way, but then the ANDgate goes across the opposite way at the top. Right? So, that creates that section. Now both norates feed up and then both and gates feed down but across and that's your setup.
Now what happens is the two norates become your set and reset. So we can paint these two different colors like one green and one red and then your output becomes this and gate in the top here. And so what happens is if we press this it'll reset. Press this it'll set reset set. And you can see we can spam it and it'll kind of get that flick sometimes, but that's what this extra gate kind of helps for. So if there's any sort of condition where you see where it pulses like that, it'll default go to the um the off position, the green, you know, set position. It doesn't green or red. It's pretty much the same. So you can alternate between which state you want, but obviously the memory bit is active when the white is active and then it's deactive when the white is off. Uh really cool setup. And really to add a timer to this, it's actually really easy. You just take a timer and you put it on this and then feed it into there. And now, however long the timer is, once you activate the memory bit, it'll fill that timer. Well, that was bad. But it'll fill the timer.
And then the timer when it gets back to there will actually reset the bit off.
Right. Like I said, nor and memory works just as well. Much more compact than the exor memory, but it's not exactly the toggle system. Now, I could make this a toggle system if we added a few more ANDgates to it. Yeah. So, you can turn it into a toggle system pretty easily if you use a couple of timers. This is actually kind of funny. It I don't know what the use case for this is. And like I said, my friend actually showed me this and I don't know if they have a reason for the They're probably going to send me like a million messages when they watch this video and they're going to be like, "Bro, you should have done this and this and this." But regardless, you can set this up as a toggle, which is kind of cool. And it's actually like an alternating toggle circuit. So, just like the longer you hold the button, it toggles through the memory. So you just put a couple of timers there and you set the timers to whatever your toggle frequency is and then essentially you just feed the gates across through the timers like this and then down and then back into themselves and then through the button on the other side here.
Right? So if we hold the button, it's going to alternate between on and off.
And if we let go of the button, like you press it once and now it switches. Press it once, it switches. And as long as you're holding it, it'll keep swapping between the two states. That's kind of cool. So you can kind of make it like um like an alternating blinker sort of circuit. Anyway, cool stuff. Don't know why you'd need that. Definitely not what my friend showed me, but really cool stuff. Now, the only other thing I really want to show you guys in this little short tutorial, and again, let me know in the comments down below if you got stuff that I missed because I'm pretty sure I did miss some things.
We're also going to go into challenge mode really quick and look at a couple things to set up a challenge that I think are super important that some people might have missed. But the final thing I wanted to show you here is multicondition logic. Cuz I use this a lot, especially when making the puzzles that I've been using in the hide-and-seek map. And I want to show you guys how to do this multicondition logic because I think it's super important. Also, let me know in the comments down below about other hideand-seek map stuff that we're working on in the mall. I'm still working on the mall, guys. I promise.
It's just a lot of freaking decoration.
Like everything is so much. I only record the video part where I'm building the hiding spots and it still takes me like five times as long to do all the decoration. just to have decoration to build the hiding spots. Anyway, multicondition logic. So, this is a multicondition logic setup. Um, this is really really cool and it might look kind of complicated, but it's really not and it's really really easy. So, if you want to set up something where you want to have like um, you know, like a puzzle where you have to activate like five different switches or four different switches or whatever before you can open the spot, you can do that with basically you have to do that with memory. U, you can also do it with a controller. You know what? But we're going to show you guys how to do it with a controller, too, cuz that's the really easy way to do it. But anyway, you can do it with memory. So, we've got four of these memory bits here. Same thing we had there before, the nor and stuff. Each of them is just wired nice and small. And then all four of these white ANDgate outputs are feeding to this master and gate output. And this master gate output also feeds back into this gate, which is attached to this button. And then that gate feeds into all the red gates here to reset. So, let's say I'm looking for switches around the map. I go, "Oh, I found this switch. Perfect. Found this switch. Perfect. Found this switch.
Perfect. Found this switch. Perfect.
That activates the sand gate. So, let's put a Yeah, we should probably have an example here. Let's put a spot down.
Right. So, here's our spot. And let's reset all that. So, we can go in. We go.
Oh, I found this switch. Spot doesn't open. This switch. Spot still doesn't open. Boom. Boom. Spot. Oh, boom. Boom.
There we go. Spot opens. Perfect. I can go into the spot and then I can have this master reset button in the spot.
So, when I go in there, I can press this once. Resets the whole thing. Spot is now closed. So really really simple way to do a a quad system. And like I said, each of these is just that memory bit from before. Just we can just take a look at this memory bit. Really simple systems. You can pause the video right now. I guess I should have done this before, but pause the video, take a look at the nor and and make a look at the direction of the logic. It's really, really simple stuff. And then we can take a look at these four. And again, all we've got extra here is these four white gates look hook into this one here to make it one centralized point. Just an endgate. This is also an endgate.
that just takes the output from this, combines it with a button, and then feeds it into all the resets. And again, the same thing we're doing over here on the exor side of things. Um, I'm going to put another block here, just with a piston. But again, on this side, it's the exact same thing we did there before. Um, same thing. Exor, right?
Exor, exor, exor activates them all.
This resets them all. The only difference between this one and that one is you'll notice with this one, once I found the button, I can mash it a million times. It will always stay lit.
it's never going to get off that state.
Whereas with the exor, if I mash the button a million times, it will turn on and off the gate. Right now, we can add an extra little logic gate here that there's guys, okay, so here's the thing with logic, right? There's a million ways to do literally anything you want to do. That's how computers work. It's binary logic. It's amazing. So, I know I'm saying all this stuff. I'm just showing you guys the way I do things.
And, you know, if you have a better way of doing things, by all means, put in the comments down below. I'm not the the worldrenowned expert on this stuff. I promise you there's people out there who are brilliant logic and there's all sorts of crazy ways you can set stuff up, but this is just the way I do it.
But again, this is toggled, right? Um, we can in fact reset that. All you need to do is just have another and gate here that says like this is a not gate. So this has to be like that, which means now once the bits on, it can't, you know, right? You can't toggle it.
Anyway, you could do that if you really wanted to change it over. And then same thing, this is once you've activated all four bits like so it fulfills that ANDgate condition spots open and then that same as before feeds into this ANDgate. But then we also need a tick pulse because we have to reset all of these memory bits with a single tick. So you can kind of tell how if you're doing multicondition logic, this is a much simpler setup courtesy of my friend. And uh this is not a simple setup. However, this is what I use because I'm I don't know. I just make all my logic on a single tick system. There are some advantages to a single tick system. The main one being like with a reset timer, for example. You can see we only have to send a one tick pulse to reset. Now the timer's empty. So we can spam this as much as we want. It'll only ever send one tick. Timer's empty, right? And it'll never that never gets interrupted.
Whereas if we try and look at uh this one with the reset, if you spam it a bunch, we might be able to get it to do it. Oh no. See, there you go. There. See how it's got like a blip in it? So you can spam a blip, right? And then of course you can't actually press it again while the timer while the timer is going. See when the timer is reset.
Anyway, there are advantages and disadvantages. So cool stuff.
Multicondition logic. Really really simple if you want to like set up some sort of a multicondition puzzle. The only other way to do multicondition, which I'm going to show you because this is like old old old school logic and it's it's like the easiest way to do it.
It's sort of bad, but you can do it this way. But you just put a sensor down and then you can just kind of put a stack of bearings. So let's say you have three switches that you have to press. You put three bearings and then this top one goes to like that point there and we put this sensor to a range of six. So essentially here's our three points.
Here's our three sets of switches that you're trying to look for.
Now of course with this one you don't really have a reset. There is actually you know what I missed a demo. There's another way we do multi multicondition logic. Um, but yeah, you can do this as well. And then same thing. Each of these has to go, let's say, 90, 90, and 90.
This is super super old school, but if you guys really are struggling, this is a way to do it. And then this one only rotate at 90. This rotates at the second 90, and this rotates at the third 90. So once all three have been activated, then finally it's in line to block the sensor. Right? But there is, sorry, one other way to do multiition logic. It's the spud gun method, right? Find a switch, find a switch, find a switch, find a switch. All four of those switches confirm. Go to your ANDgate. So the switches are literally directly hooked into the ANDgate that powers your piston which you know activates your spot. So there you go. So you'd have a spot open like that. And then of course we have that ANDgate feeding to another ANDgate which goes to our reset button.
That reset button activates all four of these spud guns. Boom. And even then you don't really need this. You could just have this reset button go into all four spud guns directly, right? And then it's like okay and ggate andgate and ggate andgate andgate fulfilled. The only difference is if you have this going into the spud gun directly without the other and gate then you could toggle them all back on. Right? Or I could do this and do this right and now they're in like a weird pattern. Um versus with the endgate it makes sure that they're all lit up before you actually turn them off. But anyway, easy way to do things.
Let's hop into challenge mode and look at one final thing. All right. So if you hop into challenge mode, you're actually this robot. And one thing that people sometimes forget is to put spud guns.
It's really important you put down one of these player spawner blocks. It's literally just like this square thing.
And if you press E to use on it, it gives you all these options. You can turn off the handbook. You can turn off the toilet and the lift and all this other stuff. But you got to make sure you turn on spud gun to make sure you give it to people. Um, easiest way to do it, you can also just like put it in a chest if you really wanted to, but the easiest way is just go to the player spawner, turn on spud gun. You can also go like health and ammo consumption and stuff. I don't I don't know, whatever floats your boat. And then, of course, you need a challenge starter and a challenge finish block. The challenge starter you have to hook into a switch.
And the challenge finish block you also hook into a switch. That's right. These are not actually attached to each other.
There we go. Like so. And then, of course, if we save and test the challenge, this starts the timer, which also allows stuff to be destructible.
That ends the challenge. And the only reason you actually need a challenge finish block is because if you want to actually like upload it to the workshop, you need to be able to finish the challenge to prove that it's like, you know, validatable or finishable or whatever. I don't know. It doesn't really matter. You don't. But for some reason, you have to be able to finish challenges to upload them to the workshop. So, you need a finish block, you need a start block, and you need to add spud guns to the list. But let me know what you guys think in the comments down below. If you think I missed anything, if there's any other information you want to see, any more logic tutorials or just tutorials in general, things that you think I've missed. I know we play a lot of hide-and-seek, which I really really do enjoy, even though I'm really bad at it still. But I know a lot of people have been asking me, like I've been getting a lot of comments. They're like, "Hey Con, can you explain how to make some spots?"
So hopefully this helped. Go back through the video and try and like replay the stuff that you missed. If there's something that really doesn't make sense to me, please just put it in the comments and I'll try and get through them all and I'll try and answer your question if I can, if it's like an easy enough answer. If not, I'll try and make a whole new video and sort of go through some other more advanced logic stuff. But let me know what you guys think. Hit those buttons down below. And as always, I hope you guys enjoyed this video and we'll see you all next time.
Related Videos
Agentforce NOW AMA: Build with React and Salesforce Multi-Framework
SalesforceDevs
490 views•2026-05-28
How agent o11y differs from traditional o11y — Phil Hetzel, Braintrust
aiDotEngineer
450 views•2026-05-28
Re: 🗣️📍theprophedu📍2026 GST 103 CLASS (E-EXAM REVISION)
theprophedu
636 views•2026-06-04
WEB TECHNOLOGIES UNIT-2 | Degree 4th sem BCOM Computers web technologies unit-2 full explanation💯✅
LearnwithSahera
1K views•2026-05-29
More tests are always better? How to use AI to identify tests that bring little value
Alliance4Qualification
335 views•2026-05-29
Search Algorithms Explained in 60 Seconds! 🤖💨
samarthtuliofficial
218 views•2026-06-01
People of Game of Thrones using JavaScript DOM
AltCampus
296 views•2026-05-30
Instagram accounts got PWNed
EricParker
13K views•2026-06-03











