teleport
Problem it solves
Your player steps into a magic portal and needs to be relocated to a new map position while playing a warp sound.
What this block does
Sets the sprite's position directly to the target X and Y coordinates and plays the retro teleport sound.
The block
Block ID: retro_teleport_sprite
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
| sprite | Sprite | Object | The sprite to teleport. |
| x | number | 80 | Target X screen coordinate. |
| y | number | 60 | Target Y screen coordinate. |
Example
let hero = sprites.create(img`.`, SpriteKind.Player) Retro.teleportSprite(hero, 120, 40)
Add the extension
Add github:CrzLe0723/RetroFx to your project, or open: Import RetroFx.