Discuss Scratch

Maca_2023
New Scratcher
1 post

How make a sprite disappear and appear again when touching green flag

Hi guys. I'm trying to make a sprite disappear when touched by other sprite, and then, appear again when pressed the green flag. I did that using Hide forever, and the "when click green flag-show. But it doesn't appear again when I press the green flag. I tried make it forever as well but then it doesn't hide when touched by the sprite! How would yo solve this? TIA
Walimimi
Scratcher
1000+ posts

How make a sprite disappear and appear again when touching green flag

You can ask this type of question here.
Anyways, that's because it always hides.(hides forever)
You should probably do something like:
when green flag clicked
show
forever
if <touching [Sprite v] ?> then
hide
end
end
Knightbot63
Scratcher
1000+ posts

How make a sprite disappear and appear again when touching green flag

So each time you click the flag the costume will show and hide after a few clicks?
Something like this?


The script uses a variable to keep track of to show or not. If it's 1, it means it'll show, if it is another number, it will hide.
Asyadfghjkl
Scratcher
100+ posts

How make a sprite disappear and appear again when touching green flag

Knightbot63 wrote:

https://assets.scratch.mit.edu/36ac29f92c80a5ed9109a90a169b5daf.png

its you again
ya.. that kinda works
OllieMan123456
Scratcher
21 posts

How make a sprite disappear and appear again when touching green flag

You could use this..

when green flag clicked
show
forever
if <touching [insert] ?> then
hide
end
end

Powered by DjangoBB