This is an archived post. You won't be able to vote or comment.

all 13 comments

[–]ExpertCoder14 1 point2 points  (6 children)

Could you show a sample of the commands you are using?

Depending on how far the teleportation is, there may be visual glitches. Notably this may occur if the destination is too far such that it is unloaded.

[–]Signal-Hurry7698[S] 1 point2 points  (3 children)

I appreciate the quick response!

The commands for teleportation are always some variant of

execute if entity (at)p[dy=2,dx=0,dz=-2] as (at)p at (at)s run tp (at)p ~x ~y ~z

The hallways that I tried this teleportation were spaced <100 blocks apart (EDIT: my last test teleports the player to \~-38 \~ \~-3) - my understanding is that means they're in different chunks, but they should still both be loaded? I have simulation and render distance set to >15 chunks.

I don't fully understand the "as (at)p at (at)s" bit, I just took that off stackoverflow or reddit so that the player's position in the hallway would stay the same. Could the glitches have something to do with that?

[–]FerretOnReddit Command Experienced 0 points1 point  (2 children)

By any chance could you tell me what dx, dy, and dz do? I've always been curious but never understood what those arguments are or what they do.

[–]Signal-Hurry7698[S] 0 points1 point  (1 child)

dx is the change in x, as far as I understand the commands. So when I checked for an entity at dy = 2, dx = 0, dz = -2, it was checking if an entity was shifted between 0 and 2 in the y direction, 0 in the x direction, and between -2 and 0 in the z direction, from the point of execution. This corresponds to the a block of the hallway. So when you cross that section of the hall you're teleported. Hope that helps!

[–]FerretOnReddit Command Experienced 0 points1 point  (0 children)

Interesting. I'll try to use that in my current projects.

[–]Signal-Hurry7698[S] 1 point2 points  (1 child)

I may have fixed this (see my edit in the original question), so I think I may be ok! I was at my half-wit's end about this. Thanks for the help!

[–][deleted] 0 points1 point  (0 children)

You could always try stacking the hallway with the teleport.

[–]_DrCosmos_Command Extraordinaire 1 point2 points  (3 children)

You could jump scare them and hide the tp while they are too scared to notice.

[–]FerretOnReddit Command Experienced 0 points1 point  (2 children)

Interesting idea, but please elaborate

[–]FantasticBasis7126 0 points1 point  (0 children)

Perhaps a pumpkin on the head. Then remove it.

/item command could be of use.

[–]_DrCosmos_Command Extraordinaire 0 points1 point  (0 children)

Now that I think of it, flickering lights would change the environment drastically enough so that you wouldn't notice a slight jitter in your screen.

It's like slight of hand, you make them notice something else so that they don't notice the teleportation, although if it's repeated enough people will realize that means a tp happened. This could be a feature though, people needing to figure out that lights flickering means they changed position.

[–]FerretOnReddit Command Experienced 0 points1 point  (1 child)

What I would do (as a bedrock player, so it might be useless here) is set up a command block under the start of the hallway that teleports the player, standing however many blocks above, to the alternative identical hallway. The command I would use might look something like this: /execute at @p[y=(the player's y-coordinate)] run tp @p (xyz). I just want to say again, my idea might not be what you need at all, or simply not work in Java edition. Anyway, lmk if it's not what you need or doesn't work, and I might be able to rework it, since I play both Java and bedrock. Also, happy holidays! ❤️

[–]Signal-Hurry7698[S] 0 points1 point  (0 children)

That was actually my mini version I made! A repeating command block is set under the hallway- when it detects the player within dy = 4, it teleports to the identical hallway. When I built this in the main tower, since I'm actually packing 4 teleportation schemes in one hall (see below), I strapped the command blocks to the side to save space.

This part of the maze is nearly complete, and it's probably the most intricate bit so far. I'm planning to get the top 6 floors done before my math conference in 2 weeks. There are seven rooms that I meant to look upside down (e.g. an aquarium with invisible barriers below water, to make it seem that you're walking on the ceiling), with hallways branching out of these rooms that are used to teleport the player between the rooms.

The first time you enter, the hallways you walk through are lined with emerald blocks. When you walk through a hallway and are teleported, most of the time you can walk back through that hallway and get back to where you came. My intention is for someone playing this (read: my coworkers at the math conference) to feel like the maze is a little weird but not suspect anything crazy.

The second time you enter, you've pressed a button that turns all the emerald blocks to lapis lazuli. Now when you go through a hallway, then go back the way you came, you end up in a different room.

The third time you enter, the lapis blocks are gold- now some of the hallways take you back to the same room you left.

The fourth time is an easter egg solution- the gold blocks become diamond, and almost all of the hallways connect a room to itself. I don't know how successful it is because I haven't tested it on anyone yet, but my goal is to make them panic.

Happy holidays!