1

Map Making: Controling players

ElegantImpact's Avatar ElegantImpact10/25/15 3:51 pm
1 emeralds 227 7
10/25/2015 4:43 pm
Sardonyx's Avatar Sardonyx
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!
Posted by ElegantImpact's Avatar
ElegantImpact
Level 3 : Apprentice Network
0

Create an account or sign in to comment.

7

Sardonyx
10/25/2015 4:43 pm
Level 50 : Grandmaster Pixel Painter
Sardonyx's Avatar
Flawless Ice
EnderDurantUse 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

1
JozyP
10/25/2015 4:15 pm
Level 42 : Master Pixel Painter
JozyP's Avatar
PM me If you need help with what these fellows are saying.
1
Bertiecrafter
10/25/2015 4:14 pm
Level 70 : Legendary Engineer
Bertiecrafter's Avatar
true, but more difficult.
Both ways are possible...
1
Bertiecrafter
10/25/2015 4:08 pm
Level 70 : Legendary Engineer
Bertiecrafter's Avatar
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...
1
Sardonyx
10/25/2015 4:10 pm
Level 50 : Grandmaster Pixel Painter
Sardonyx's Avatar
Yes, but mine is a bit more stable, and less likely to have issues with tping the wrong player.
1
Sardonyx
10/25/2015 4:03 pm
Level 50 : Grandmaster Pixel Painter
Sardonyx's Avatar
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.
1
ElegantImpact
10/25/2015 4:27 pm
Level 3 : Apprentice Network
ElegantImpact's Avatar
Thanks so much! This really helped <3
1
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome