Is it possible to teleport someone relative to their position? [Finished]

  • If you're asking a question make sure to set the thread type to be a question!

TwashMan

L1: Registered
Sep 14, 2016
37
13
Lets say i was in a room. And then i pressed a button. that would teleport me to another room about 5000 hammer units awey. Would it be possible to have a teleport that keep my orgentation, momentum, and position and just teleports me -5000 hammerunits in the x axys?

If you don't get the concept its just like with minecraft "/tp @p ~0 ~5 ~0" that would teleport the player 5 blocks upwards.
 

Egan

aa
Feb 14, 2010
1,375
1,720
Ya you can use trigger_teleport with the Local Destination Landmark keyvalue set (supposedly you can just use !self, it says, to offset the target by how the client entered the teleport itself, but I haven't tested that personally).

There exists also a trigger_teleport_relative that you can instead set someone to teleport XYZ units away from the trigger, but this is based off the offset of the origin of the brush, and not the origin of the player when they entered the brush, which is what the former does.
 

TwashMan

L1: Registered
Sep 14, 2016
37
13
Ya you can use trigger_teleport with the Local Destination Landmark keyvalue set (supposedly you can just use !self, it says, to offset the target by how the client entered the teleport itself, but I haven't tested that personally).

There exists also a trigger_teleport_relative that you can instead set someone to teleport XYZ units away from the trigger, but this is based off the offset of the origin of the brush, and not the origin of the player when they entered the brush, which is what the former does.

Will the "Local Destination Landmark keyvalue" keep the players orgentation?
 

The Letter Before A

Cool Idiot
Jul 15, 2016
292
196
Will the "Local Destination Landmark keyvalue" keep the players orgentation?
I would recommend doing some testing
Maybe when you figure it out you could make an article on it. People would love you for that.
 

Egan

aa
Feb 14, 2010
1,375
1,720
Will the "Local Destination Landmark keyvalue" keep the players orgentation?

I'd also advise spending (just) a couple of minutes making a test map to try it out, like The Letter Before A mentioned, but yes it does. It's used often in surf maps where the map length tends to be longer than the confines of the max map boundaries and needs to continue elsewhere.
 

TwashMan

L1: Registered
Sep 14, 2016
37
13
I'd also advise spending (just) a couple of minutes making a test map to try it out, like The Letter Before A mentioned, but yes it does. It's used often in surf maps where the map length tends to be longer than the confines of the max map boundaries and needs to continue elsewhere.

Non euclidian geometry here i come!