1

Question about teleporting

hTiwX's Avatar hTiwX3/21/17 11:05 pm
1 emeralds 454 6
5/30/2017 5:00 pm
Sparthia's Avatar Sparthia
Hello! So I've been doing a space ship (UFO) thing. However, I need this thing to move. I use /clone command to make all the 3k blocks move with all the systems on it (doors, elevators, lamps) but i've faced a problem which seems pretty simple compared to the project that I almost finished. The thing is:

- The whole ship teleports (up/down/left/right/forward/backward) with # (let's say 40) blocks.

- The player must teleport with the ship, otherwise he will fall standing at the same place (X, Z) when the ship is gone.

- A command by the player could teleport him using /tp nickname ~40 ~ ~ if the ship teleports towards positive X (+40 blocks from where he stood).

- BUT if the command is done by a command block the ~ will get the coordinates of the command block itself (+40 blocks from where the command block stood)

- Which automatically means that he cannot move (if we use /tp @p ~40 ~2 ~) while the ship is moving because it is always the same coordinate that the command block uses (and the command block does not move lol) which is a bit wooden.

If there is no possible way or in case my question does not get answered I would go with that thing (like the driver is standing in a "chair" with belts binded around him (barrier blocks))

So my question is:

Is there a possible way for a command block to teleport a player according to the player's coordinates (like the player uses the command) in that case /tp ....... ~40 ~ ~ (from where the player is standing)?
Posted by hTiwX's Avatar
hTiwX
Level 1 : New Miner
0

Create an account or sign in to comment.

6

1
05/30/2017 5:00 pm
Level 20 : Expert Network
Sparthia
Sparthia's Avatar
Using plugins will make this alot easier lol
1
05/30/2017 4:34 pm
Level 57 : Grandmaster Cyborg
Pepijn
Pepijn's Avatar
The ~ coordinates in the /tp command are relative to the selector, not the executor (the /tp command is the only command that does this). This is why there's also a /teleport command, for which the ~ coordinates are relative to the executor like all other commands.
1
05/26/2017 11:11 am
Level 16 : Journeyman Engineer
Cadermate
Cadermate's Avatar
use /execute to move the player on a chain command block after the teleport command so it would be /execute @p ~ ~ ~ tp @s ~40 ~ ~. That is a lot of blocks being teleported, are you sure all the chunks will load in when the player teleports the ship?
1
03/22/2017 3:09 am
Level 5 : Apprentice Miner
anonpmc792389
anonpmc792389's Avatar
[deleted]
1
03/22/2017 3:00 am
Level 1 : New Miner
hTiwX
hTiwX's Avatar
Jamzs3

"/clone command to make all the 3k blocks" Holy crap, the amount of command blocks man.

"The whole ship teleports" - You'll need more than one command block

"The player must teleport with the ship" - Use an armor stand and teleport the player with, to avoid any glitching through blocks.

Moving the player through an armor stand allows for forced movement since you use a dispensing command block somewhere to randomize teleportation.

If the player is inside the ship, no need to make it move, use the armor stand idea to cause movement. Otherwise, you'll have to have a lot of clone blocks ready.


I'll try that, buddy! Thanks! Do you think the /clone command will cause less lag if done by 2 or 4 commands from more than one command block or do you mean something else? It takes like 2 seconds to execute though.
1
03/22/2017 1:41 am
Level 5 : Apprentice Miner
anonpmc792389
anonpmc792389's Avatar
[deleted]
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome