Hello my name is Leafeon and I've been struggling with redstone today. I was wondering if it was possible to make it so if a button was pressed, it would play a command and if it were to be pushed again, it would stop the command (1st press - Command plays, 2nd press - command stops, 3rd press - Command plays and so forth).
I'm currently working on a Jacuzzi in a house I'm constructing and want a single button (when clicked a first time) to set a redstone block to run:
/particle [particle] x y z x1 y1 z1 [speed] [amount]
and when the button is hit the second time, the redstone block is removed, causing the particles to stop displaying.
with a chained command block attached to it with the command
/execute if block ~ ~[-y] ~ redstone_block run setblock ~ ~[-y] ~ air
However when ran, the redstone block would place, but immediately be removed.
I would like it so a command block under the button sets a redstone block at [x,y,z] coordinates, activating the command, but once the button clicks a second time, the redstone block is removed, and continue with this pattern.
Questions I have:
Is there a way I could do this? Would it be possible to set a limit where if a redstone block is set for a period of time and the button was pressed again, it would remove the block (Meaning if the block were to be set for 10 seconds and if the button was pressed 10 seconds later or more, the block would be removed)?
I do apologize if my wording does end up confusing you or if you don't know what I'm trying to ask. If you can assist me with my issue, that would be wonderful! Thank you!
The Meaning of Life, the Universe, and Everything.
Join Date:
2/11/2017
Posts:
662
Member Details
You should use a "repeating always active needs redstone" command block. It will check for a redstone signal every tick and run the command if it finds that signal. When the redstone block is there, the command will be enabled. When it isn't, the command will be disabled.
Rollback Post to RevisionRollBack
Remember those versions that minecraft pranked us with? Specifically:
Minecraft 2.0
Minecraft 1.VR-Pre1
Snapshot 15w14a
Minecraft 3D
Those are still downloadable! Watch this video for 2.0:
To download the other ones you need to make a folder in the versions folder for minecraft and put the client and JSON file for the versions in there. They all need to be named the same aside from file extensions. Once you do that, you will be able to choose that version when making a new profile with the minecraft launcher.
To download the other ones you need to make a folder in the versions folder for minecraft and put the client and JSON file for the versions in there. They all need to be named the same aside from file extensions. Once you do that, you will be able to choose that version when making a new profile with the minecraft launcher.
just to save you time: use a T flip-flop. easiest design is to take a redstone output from the button, place an observer next to it observing it, run that into a sticky piston with a redstone block.
button->wall->redstone wire (or repeater)->observer->sticky piston->redstone block->air->output
Hello my name is Leafeon and I've been struggling with redstone today. I was wondering if it was possible to make it so if a button was pressed, it would play a command and if it were to be pushed again, it would stop the command (1st press - Command plays, 2nd press - command stops, 3rd press - Command plays and so forth).
I'm currently working on a Jacuzzi in a house I'm constructing and want a single button (when clicked a first time) to set a redstone block to run:
/particle [particle] x y z x1 y1 z1 [speed] [amount]
and when the button is hit the second time, the redstone block is removed, causing the particles to stop displaying.
(3rd - Particles are shown, 4th - Particles aren't shown, etc.)
I tried /setblock ~ ~[-y] ~ redstone_block
with a chained command block attached to it with the command
/execute if block ~ ~[-y] ~ redstone_block run setblock ~ ~[-y] ~ air
However when ran, the redstone block would place, but immediately be removed.
I would like it so a command block under the button sets a redstone block at [x,y,z] coordinates, activating the command, but once the button clicks a second time, the redstone block is removed, and continue with this pattern.
Questions I have:
Is there a way I could do this? Would it be possible to set a limit where if a redstone block is set for a period of time and the button was pressed again, it would remove the block (Meaning if the block were to be set for 10 seconds and if the button was pressed 10 seconds later or more, the block would be removed)?
I do apologize if my wording does end up confusing you or if you don't know what I'm trying to ask. If you can assist me with my issue, that would be wonderful! Thank you!
~ ShinyLeafeon
You should use a "repeating always active needs redstone" command block. It will check for a redstone signal every tick and run the command if it finds that signal. When the redstone block is there, the command will be enabled. When it isn't, the command will be disabled.
Remember those versions that minecraft pranked us with? Specifically:
Those are still downloadable! Watch this video for 2.0:
https://www.youtube.com/watch?v=PQdu9LKAdIU
To download the other ones you need to make a folder in the versions folder for minecraft and put the client and JSON file for the versions in there. They all need to be named the same aside from file extensions. Once you do that, you will be able to choose that version when making a new profile with the minecraft launcher.
15w14a is on this link:
http://minecraft.gamepedia.com/15w14a
1.RV-Pre1 is here:
http://minecraft.gamepedia.com/1.RV-Pre1
Minecraft 3D is here:
https://minecraft.gamepedia.com/Java_Edition_3D_Shareware_v1.34
Which command should I use for the command block to indicate whether or not there's a redstone block there?
The command block will automatically do that for you. It responds to any redstone signal you apply to the block.
Remember those versions that minecraft pranked us with? Specifically:
Those are still downloadable! Watch this video for 2.0:
https://www.youtube.com/watch?v=PQdu9LKAdIU
To download the other ones you need to make a folder in the versions folder for minecraft and put the client and JSON file for the versions in there. They all need to be named the same aside from file extensions. Once you do that, you will be able to choose that version when making a new profile with the minecraft launcher.
15w14a is on this link:
http://minecraft.gamepedia.com/15w14a
1.RV-Pre1 is here:
http://minecraft.gamepedia.com/1.RV-Pre1
Minecraft 3D is here:
https://minecraft.gamepedia.com/Java_Edition_3D_Shareware_v1.34
Alright I'll try it out then. I'll let you know whether or not it works.
Thanks for the help by the way!
Did something else for it with split paths.
Thanks for your help! Appreciate it!
just to save you time: use a T flip-flop. easiest design is to take a redstone output from the button, place an observer next to it observing it, run that into a sticky piston with a redstone block.
button->wall->redstone wire (or repeater)->observer->sticky piston->redstone block->air->output
Creator of Metroid Cubed 3, a Metroid-themed mod! Become a donator today!