Pushbutton


A Pushbutton that emits the configured signal as a pulse when pressed.

1 year, 9 months ago
0.14 - 1.1
23.3K

i Thanks!

7 years ago

This thing is really handy! Thanks for creating it.

I would love to have a toggle switch. Any chance you could make one? Perhaps it would have two outputs and toggle between the two when flipped. I can imagine it as a sort of constant combinator with an old fashioned throw switch from Frankenstein's lab on top.

7 years ago
(updated 7 years ago)

no need to get unnecessarily many items ...

it's VERY easy to build a toggle, thanks to the pushbutton:
take one decider combinator, set condition to A=1 and output to A(1).
set a pushbutton to A(1)
to see the output, put down two lamps with conditions A=0 and A=1
finally connect pushbutton to decider input, and decider output to both lamps with green (or red) wires, and decider input and output with a red (or green) wire.
each push of the pushbutton will toggle the output between A(0) and A(1).
of course, you can replace all A with any letter or other signal you like.

to get any value as output, replace the lamps with an arithmetic combinator and multiply A by the value you want, to switch that value on and off. add more arithmetic combinators to calculate whatever you want, eg B = A + 0 and C = B * yourvalue1, and D = A - 1 and E = D * -yourvalue2, to toggle between those two values (the B=A+0 is needed to get both results on exactly the same tick)
depending on your wiring, you can do all these calculations with the same signal as input and output, connect the two final outputs, and thus get a real toggle between yourvalue1 and yourvalue2

1 year, 2 months ago

it's VERY easy to build a toggle

Followed by 6 lines of explanation ^^ I would also like to have a toggle version :-) That way you can switch on/off stuff easily.

New response