How do I make the comparator work and then stop?

I made a redstone clock that involves a command block with /testfor and a comparator attached to it. Whenever the /testfor works, the comparator turns on, but completely.(meaning it does not turn off after that) I want it to turn on, have a small delay, then turn off. is there some way that i should change this clock, or should I be doing something different with the comparator?enter image description here

  • How can I trick Minecraft into thinking two computers are on the same wifi network?
  • Breaking a wood block in Adventure mode
  • How do level seeds work?
  • How can I avoid mobs spawning inside my house while I sleep?
  • Can Minecraft be played by two players locally on the same account?
  • How can I prevent hostile mobs from spawning?
  • FTB Ultimate Server constantly giving “can't keep up!” errors
  • Should my energy collectors be running even when I'm logged off?
  • Tellraw problems in 1.9
  • How do I get rid of these bats on minecraft
  • How can I control a sequence of outputs via a single input?
  • setworldspawn is not spawning players to the exact place
  • One Solution collect form web for “How do I make the comparator work and then stop?”

    Once it turns on the lamp trigger this command:

    /blockdata (pos of the command_block with the clear command) {SuccesCount:0}

    Then do a delay with redstone repeaters that triggers a command block with this command:

    /setblock x y z minecraft:unpowered_comparator
    

    Where the x, y, and z are the coordinates of your comparator. This will reset the comparator to an off state.

    We love Playing Games, especially Video Games.