I'm trying to make a chain of command blocks that would change a player's gamemode and then teleport them somewhere from the press of 1 button. I tried connecting them with redstone and also tried using a repeater and nothing has worked. Any suggestions?
For your first command, place an impulse command block. Then, for all subsequent commands, use a chain block on 'always active'.
1.8 and below answer
This is possible with the use of repeaters.
Simply string your command blocks together like so:
This will execute the commands left to right with a 4 tick delay between each when the button is pressed.
The delay on the repeaters can be changed or more repeaters can be added to make the delay between executions quicker or slower.
In 1.9 just use an IMPULSE command with
/gamemode @p 0
then use a CHAIN command block with
/tp @p x y z
z should be map coords. use
~ to make them relative coords.)
Make sure the chain block is set to "always active".
Also make sure the arrow of the impulse block points toward the chain block. Slap a button on the impulse or adjoining solid block and you are ready.
If you only need two commands, just plop both command blocks right next to each other:
If you need more commands, line them up with repeaters:
Make sure that the repeaters are facing the right direction. If they're not in the correct orientation, they aren't going to relay the redstone signal to subsequent blocks.
I just learned how to use
/execute command on entity. Type
/execute @e [type=arrow/snowball/armor_stand/egg e.t.c.] ~~~ then
tp/fill (coordinates). I use this to make fast bridges or clear huge places and it's fun. Just remember to set command block on repeating and always active.
Fast bridge -
1st command block-
/execute @e [type=armor_stand] ~~~ tp ~~1- speed and direction
2nd command block-
/execute @e [type=armor_stand] ~~~ fill ~1~~1 ~-1~~-1. You can operate with numbers to see changes.
I hope this will help you to know command blocks better. Good luck. ;)