add trail
Problem it solves
Your hero acquires a speed boost and you want them to leave after-image ghost sprites behind as they run.
What this block does
Spawns temporary ghost sprites behind the target sprite at regular time intervals.
The block
Block ID: retro_trail_effect
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
| sprite | Sprite | mySprite | The sprite that creates the trail. |
| img | Image | img`.` | The trail particle image to drop behind the sprite. |
| interval | number | 50 | Delay between spawning trail particles in milliseconds. |
Example
let hero = sprites.create(img`.`, SpriteKind.Player) Retro.trailEffect(hero, img`.`, 60)
Add the extension
Add github:CrzLe0723/RetroFx to your project, or open: Import RetroFx.