Author Topic: doPlayerTeleport - setPlayerTransform without the bugs!  (Read 8645 times)

Description
The doPlayerTeleport event is basically an event that handles relative, directional, static or dynamic player teleportation. You can use it simply to send a player up to the top of your tower, with a view of the beginning of the slide even if they weren't facing that way before - or you can use it to make teleporting a player from one room to an identical copy of that room completely undetectable.

It works like setPlayerTransform, but without the hacks, meaning it's a lot more reliable. It has the same boxes as setPlayerTransform, too, except there's a new field at the start for the brick to teleport to. It can also do one thing that setPlayerTransform couldn't - teleport a player to another brick relative to a nearby brick. This is because the brick the event is on is now the brick that "triggers" the Teleportation. Hence the name, doPlayerTeleport.

Instructions For Use
The syntax of the event is as follows.
doPlayerTeleport [DESTINATION] [DIRECTION] [KEEP VELOCITY] [RELATIVE]

Destination is the name of the target brick. If you want the target to be the brick you triggered the event on, put "SELF" here.

Direction works in the same way that it did in setPlayerTransform. It's the way your player faces after the teleportation. Pretty self explanatory when you see the list.

Keep Velocity is whether, if the player is moving, they will keep the speed they were moving at. For example, if a player hits a brick at speed and the brick teleports them to another brick, they will be moving at that speed when they arrive. E.g. for portals.

Finally, relative is the special one. If your "teleport button" triggers the event on a baseplate and the event's target is another baseplate, the player will be on the SAME PART of the other baseplate that they were on the original baseplate. Teleport from the corner, you'll be in the corner. Done properly, you can create non-euclidean environments with clever teleportation tactics. Incidentally, if you don't select this box, triggering the teleport event from a different brick to the one the player triggered has no effect at all on the outcome teleportation.

Note that if you have the target as "SELF" when doing a relative teleportation, you won't move at all. Guess why.

Download
Go here.


tesseract here i come motherforgeter


ok so picture this and tell me if it will work or not

i place two bricks at the bottom of a big drop
i event one to teleport me to the other with keep velocity enabled

i jump down, teleport, WHAT HAPPENS? does my velocity get turned around and i get shot upward? do i appear on the bottom side of the second brick and die instantly from fall damage?

Is there a way to keep direction with rotation, rather than dictating it?

tesseract here i come motherforgeter


ok so picture this and tell me if it will work or not

i place two bricks at the bottom of a big drop
i event one to teleport me to the other with keep velocity enabled

i jump down, teleport, WHAT HAPPENS? does my velocity get turned around and i get shot upward? do i appear on the bottom side of the second brick and die instantly from fall damage?
your velocity is kept the same. i can add an option to reverse it if you want.

Is there a way to keep direction with rotation, rather than dictating it?
select "relative"


It can also do one thing that setPlayerTransform couldn't - teleport a player to another brick relative to a nearby brick.
Can you rephrase this? I'm not really sure what you mean

Other than this though, someone already fixed setplayertransform for the most part. I don't know if he ever released it, but whenever I tested it I couldn't get it to break like the old version. This is still cool though

Can you rephrase this? I'm not really sure what you mean

Other than this though, someone already fixed setplayertransform for the most part. I don't know if he ever released it, but whenever I tested it I couldn't get it to break like the old version. This is still cool though
how did he "fix" it? if he reused any of rot's code it could glitch just as much as the old one, which only packaged certain event callbacks and used a horrible timeout system to work correctly.

Could you make a video preview? I don't quite understand it.

Could you make a video preview? I don't quite understand it.
It's the same as setPlayerTransform but it works in a more reliable way and has the extra, though accidental feature of being able to teleport you to a brick relative to a brick that isn't the one the event was triggered on. You can  put your teleport event in a different brick and the script will treat it like that's the brick you teleported from. Only really matters when you're doing fancy relative stuff.

It's the same as setPlayerTransform but it works in a more reliable way and has the extra, though accidental feature of being able to teleport you to a brick relative to a brick that isn't the one the event was triggered on. You can  put your teleport event in a different brick and the script will treat it like that's the brick you teleported from. Only really matters when you're doing fancy relative stuff.
:o

for those who don't understand, for the original setplayertransform you couldn't have the events on another brick trigger the teleportation, like by having the brick fire a relay to another brick which contains the teleport event, and having that brick teleport the person triggering the original relay event. this one, however, can.

this makes this one 100x better.


Also, you can do some rather interesting things with this one that you couldn't do before
time for anitchamber in blockland


is it possible to have MULTIPLE PLAYERS ON THE SAME BRICK be teleported with this?

because what i find in setPlayerTransform is that only the owner of the brick get's teleported

time for anitchamber in blockland


is it possible to have MULTIPLE PLAYERS ON THE SAME BRICK be teleported with this?

because what i find in setPlayerTransform is that only the owner of the brick get's teleported
yes.

time for anitchamber in blockland

Beat me to it
OT: Now I understand!