tp backwards

I would like to know how to make something teleport backwards, like, say, if it was facing up-right at a 45 degree angle, I want it to teleport backwards, down-left in the opposite direction.

I cant think of any possible way to do that

So there are a couple of ways. This one is kind of janky, but really simple:

  1. make a “teleporter” object
  2. when you want to teleport, emit this object from the object you want to teleport with a negative force, so it goes backwards.
  3. after a period of time, send a message to the object you want to teleport with the teleporter’s x & y position
  4. set your object to the teleporter’s position

Here’s an example: http://flowlab.io/game/play/423346 (arrow keys to move, t to teleport)

I left the teleporter visible so that it’s obvious what’s going on, but you probably want to make it invisible (just set the alpha to 0)

@grazer thats actually very interesting (And I will probably use that in another game soon) But my problem is, I have a turret-type enemy and he shoots, but the bullet appears way too far ahead (maybe a block or so) so I thought maybe a good way to do this would be to teleport it a little back once it spawns, and I think this method would be too slow.

Any other way?

Well. It could start out disabled and when TP it enables it

@jngthree you are a genius. Thanks guys, I’ll try it out