Discuss Scratch

SharkgalXD
New to Scratch
3 posts

Make a sprite dissapear/hide forever when a different sprite is clicked?

Hello! Im currently trying to make avirtualpet game , and at the start you choose 1 petout of 2. If you choose one pet, what can i use to make the other be deleted / hide forever?Help would be very appreciated, Thanks!
This is the game:
https://scratch.mit.edu/projects/225009924/#player
Happysoul05
Scratcher
100+ posts

Make a sprite dissapear/hide forever when a different sprite is clicked?

You can hide it.No need to do it forever.

But if the games gets big you can do it by making clones
and using delete this clone block.
SharkgalXD
New to Scratch
3 posts

Make a sprite dissapear/hide forever when a different sprite is clicked?

Yes but that the problem, i need it to delete otherwise it shows up again after you press certain things
Happysoul05
Scratcher
100+ posts

Make a sprite dissapear/hide forever when a different sprite is clicked?

So you want to disable scripts.
So You can do this:
Other than selected You can use kitty variable.
If kitty is 1 then only scripts of kitty one should work use
if kitty ==1 then:
do something and for kitty 2 use 2

when [space v] key pressed
if <(selected)=[true]> then
Some code::custom
end

when I receive [something v]
if <(selected)=[true]> then
Some code::custom
end
gunnarsboy
Scratcher
20 posts

Make a sprite dissapear/hide forever when a different sprite is clicked?

Right off the top of my head,
when I receive [broadcast v]
forever
hide
end

reeeeeee
deck26
Scratcher
1000+ posts

Make a sprite dissapear/hide forever when a different sprite is clicked?

gunnarsboy wrote:

Right off the top of my head,
when I receive [broadcast v]
forever
hide
end
But as already stated you shouldn't need to do it forever. If something else is going to make it show again and conflict with the forever loop it is much better to address the problem properly than let two scripts run unnecessarily. As @Happysoul05 says, just use an if block to stop the wrong sprite showing again and you only need to hide it once.
AAAjudd
New to Scratch
2 posts

Make a sprite dissapear/hide forever when a different sprite is clicked?

thank you guys

















Powered by DjangoBB