Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Sprite trails
- Barney_at_Bonels83
-
Scratcher
500+ posts
Sprite trails
Hello.
I wanna code those things that are somehow popular on youtube shorts where a ball is trapped inside a shape and it does something every time it does a certain command.
I am making on with Scratch Cat. But I wanna make the Scratch cat have a trail while it glides.
How do I do this?
I wanna code those things that are somehow popular on youtube shorts where a ball is trapped inside a shape and it does something every time it does a certain command.
I am making on with Scratch Cat. But I wanna make the Scratch cat have a trail while it glides.
How do I do this?
- RethinkingVoxels
-
Scratcher
1000+ posts
Sprite trails
There's multiple ways on doing this, but there is two ways, with clones, and with pen.
For clones:
Pen:
For clones:
// in cat sprite
when gf clicked
forever
...
create clone of [myself v]
end
when I start as a clone
fade evenly into (10) frames ::custom //change 10 to whatever
delete this clone
define fade evenly into (frames) frames
// DO NOT RUN WITHOUT SCREEN REFRESH
repeat (frames ::input)
change [ghost v] effect by ((100) / (frames ::input))
Pen:
//in cat sprite
when gf clicked
forever
...
stamp
end
//in a new sprite named "Curtain", with your background of choice
when gf clicked
erase all
go to [back v] layer ::looks
set [ghost v] effect to (75) //the higher, the longer the pen trail
hide
forever
stamp
Last edited by RethinkingVoxels (Jan. 28, 2024 22:03:33)
- Kool_Koder1166
-
Scratcher
17 posts
Sprite trails
I would use the pen attachment's “stamp” block. You could do something like this:
when green flag clicked
forever
stamp
end
- bunnyCoder16
-
Scratcher
500+ posts
Sprite trails
You would need a mouse trail or sprite tail.
Please give credit if use my code in your project.
Please give credit if use my code in your project.
- Discussion Forums
- » Help with Scripts
-
» Sprite trails