floating text
Problem it solves
An enemy takes damage and you want a '+10' or 'CRIT!' label to float above their head and fade away.
What this block does
Spawns a temporary text sprite slightly above the target sprite with an 800ms lifespan.
The block
Block ID: retro_floating_text
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
| text | string | The message or damage number to show. | |
| sprite | Sprite | mySprite | The sprite above which text will float. |
Example
let enemy = sprites.create(img`.`, SpriteKind.Enemy)
Retro.floatingText("-25 HP", enemy)Add the extension
Add github:CrzLe0723/RetroFx to your project, or open: Import RetroFx.