MakeCode Games!

A fan-made community library of MakeCode Arcade games. Visit MakeCode Arcade to make a game!

← Back to extensions

Retro FX

Add juicy 8-bit sound synthesizers, screen shakes, particle explosions, camera effects, and retro text displays to your games.

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

teleport $sprite to x $x y $y block

Parameters

NameTypeDefaultMeaning
spriteSpriteObjectThe sprite to teleport.
xnumber80Target X screen coordinate.
ynumber60Target 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.