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.

play charge sound

Problem it solves

The player holds down an attack button to charge a mega beam and you need the charging tone to rise as energy builds up.

What this block does

Plays a synthesized sound whose pitch is mapped between minimum and maximum charge values.

The block

Block ID: retro_charge_sound

play charge sound charge $charge max $maxCharge block

Parameters

NameTypeDefaultMeaning
chargenumber0The current charge energy value.
maxChargenumber100The target charge capacity value.

Example

Retro.playCharge(75, 100)

Add the extension

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