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
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
| charge | number | 0 | The current charge energy value. |
| maxCharge | number | 100 | The target charge capacity value. |
Example
Retro.playCharge(75, 100)
Add the extension
Add github:CrzLe0723/RetroFx to your project, or open: Import RetroFx.