1
Map Making: Controling players
Hi all!
I am making a map, and one of the challenges is that Player 1 must guide Player 2 through a maze, using buttons. Player 2 can't move on their own (I have done this by using potion effects) and I planned to make it so when Player 1 pressed the buttons, Player 2 would be teleported one block in the direction Player 1 chooses.
But I don't know how to do this!
Please help <3
Thanks!
I am making a map, and one of the challenges is that Player 1 must guide Player 2 through a maze, using buttons. Player 2 can't move on their own (I have done this by using potion effects) and I planned to make it so when Player 1 pressed the buttons, Player 2 would be teleported one block in the direction Player 1 chooses.
But I don't know how to do this!
Please help <3
Thanks!
Create an account or sign in to comment.
7
Flawless IceEnderDurantUse a command block (/give @p command_block) to give your self a command block. Type this into the chat:
/scoreboard objectives add player2 dummy
Then, have player 2 step on a pressure plate which gives the command block power. Enter this text into the command block:
/scoreboard players set @p player2 1
Then attached to each of the buttons put one of these commands:
/tp @a[score_player2_min=1,score_player2=1] ~1 ~ ~
/tp @a[score_player2_min=1,score_player2=1] ~-1 ~ ~
/tp @a[score_player2_min=1,score_player2=1] ~ ~ ~1
/tp @a[score_player2_min=1,score_player2=1] ~ ~ ~-1
They will each tp the player in a different direction, depending on the coordinates at the end. Just switch them around until they are matched to the right buttons.
Hope I helped! If you have any more questions, just ask me.
Thanks so much! This really helped <3
PM me If you need help with what these fellows are saying.
true, but more difficult.
Both ways are possible...
Both ways are possible...
or only:
/tp @a[rm=4] ~1 ~ ~
/tp @a[rm=4] ~-1 ~ ~
/tp @a[rm=4] ~ ~ ~1
/tp @a[rm=4] ~ ~ ~-1
under different pressure plates
just make sure the other player (the frozen one) doesn't go within 4 blocks around the command blocks...
/tp @a[rm=4] ~1 ~ ~
/tp @a[rm=4] ~-1 ~ ~
/tp @a[rm=4] ~ ~ ~1
/tp @a[rm=4] ~ ~ ~-1
under different pressure plates
just make sure the other player (the frozen one) doesn't go within 4 blocks around the command blocks...
Yes, but mine is a bit more stable, and less likely to have issues with tping the wrong player.
Use a command block (/give @p command_block) to give your self a command block. Type this into the chat:
/scoreboard objectives add player2 dummy
Then, have player 2 step on a pressure plate which gives the command block power. Enter this text into the command block:
/scoreboard players set @p player2 1
Then attached to each of the buttons put one of these commands:
/tp @a[score_player2_min=1,score_player2=1] ~1 ~ ~
/tp @a[score_player2_min=1,score_player2=1] ~-1 ~ ~
/tp @a[score_player2_min=1,score_player2=1] ~ ~ ~1
/tp @a[score_player2_min=1,score_player2=1] ~ ~ ~-1
They will each tp the player in a different direction, depending on the coordinates at the end. Just switch them around until they are matched to the right buttons.
Hope I helped! If you have any more questions, just ask me.
/scoreboard objectives add player2 dummy
Then, have player 2 step on a pressure plate which gives the command block power. Enter this text into the command block:
/scoreboard players set @p player2 1
Then attached to each of the buttons put one of these commands:
/tp @a[score_player2_min=1,score_player2=1] ~1 ~ ~
/tp @a[score_player2_min=1,score_player2=1] ~-1 ~ ~
/tp @a[score_player2_min=1,score_player2=1] ~ ~ ~1
/tp @a[score_player2_min=1,score_player2=1] ~ ~ ~-1
They will each tp the player in a different direction, depending on the coordinates at the end. Just switch them around until they are matched to the right buttons.
Hope I helped! If you have any more questions, just ask me.
Thanks so much! This really helped <3