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.

dash

Problem it solves

Your player presses a dash button and you want a burst of horizontal speed followed by a cooldown pause before next use.

What this block does

Adds velocity to the sprite along the X-axis and pauses execution for the cooldown duration.

The block

Block ID: retro_dash_cooldown

dash $sprite speed $speed cooldown $cooldown ms block

Parameters

NameTypeDefaultMeaning
spriteSpritePlayerThe sprite performing the dash.
speednumber100Additional horizontal velocity to add.
cooldownnumber500Cooldown pause time in milliseconds.

Example

let hero = sprites.create(img`.`, SpriteKind.Player)
Retro.dashCooldown(hero, 100, 400)

Add the extension

Add github:CrzLe0723/RetroFx to your project, or open: Import RetroFx.