Code for teleportation

HI! I got a great help from people who told me how to make a top down game, so now I want to know what is the code for allowing a player to teleport from one place to another in the SAME level without pressing a key, and just colliding with an item

1 Like

Iā€™m pretty sure PixelPizza will give you a big example, but basically just use a position block to teleport to set coordinates.

Every 32 numbers is 1 block, so if you wanted the player to teleport 10 blocks right, then you could add 320 to the coordinates upon collision.

Hi, you can use a trigger(it sounds like you want to use collision) and then input into X and Y coordinates (numbers) that input to a position behavior.

Collision > Number: X coordinates, Number: Y coordinates > Position Behavior.

image

3 Likes