Minecraft Redstone delay that only works if active for 5 seconds but turns off when not active

minecraft-java-editionminecraft-redstone

enter image description here
The image here is my example. the command block to the left places a redstone block on the quartz. the command blocks on the side remove the Redstone block and replace the repeaters. this method still doesn't work.
Edit: so the problem is that with is method even with the repeaters getting replaced, somehow the signal still moves. I think the problem is that I set the repeaters to a delay, so the signal still moves.
So if I were to stand on a pressure plate, how would I make the pulse wait but as soon as I'm not on the pressure plate, the pulse stops?
even when I set the repeaters with a 2 tick delay, they still moved the pulse a long.

I've tried having the pressure plate hook up to a command that places a Redstone block then removes it when it isn't active, but that still makes the output still activate even when I'm not standing on the pressure plate.

Best Answer

I've found a solution enter image description here Ok, so the two command blocks linked to the clock are placing and removing the block between the comparator and the repeating command block. the command block is testing where if someone is standing on the quartz. the command block that is linked to gives everyone XP. it does this as long as someone is standing on the block and cancels if someone isn't. What I wanted was for someone to stand on a block, and it kept on giving them XP. but the problem with just having it test for and then send out a signal is that even when they aren't standing on it, they still get the XP. but if I make it a one-time thing and check it constantly, then it will work. I am sorry everyone for the confusion I gave you. So in the end, using scoreboards are the best way to have a delay that can be stopped immediately.

Related Topic