Teleport


Every shape can teleport to any point in the canvas using the teleport command. For example, to teleport a rectangle named block to point (200, 200), the command we write is

block.teleport(200, 200)

Revine Teleport Example

a general syntax for invoking move is

<name of shape>.jump(<distance>)

Example

To make the block teleport to (200, 200) when the key w is pressed we write

shape block(rectangle):
  .color = RED
  .position = (100, 100)
  .fill = RED
  .width = 25
  .height = 65
endshape

onkey w
  block.teleport(200, 200)
endonkey

Notice any errors or typos? Please let us know or feel free to edit teleport.md and issue a pull request.


Follow us on twitter @RevineLang

Built by Arpit Bhayani