Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sprite disappears in Scratch even when touching another sprite

Tags:

mit-scratch

On my puppy salon project, I have run into a problem when I get to the necklace section. I want all the unused necklaces to disappear when they receive the message m11, but for the one on the puppy to remain. Right now, however, all the necklaces are disappearing.

This is the code that is run when the necklace is assigned to the puppy:

when this sprite clicked glide 1 secs to x: -10 y: -5

Which puts it on top of the puppy sprite.

And when the page is advanced (this is in an arrow sprite):

when this sprite clicked broadcast m11 hide

This message is received by each necklace:

when I receive m11 hide; if touching Sprite1 then show

My whole project is here.

like image 670
MaggieLouise Avatar asked Dec 03 '25 17:12

MaggieLouise


1 Answers

A sprite cannot sense that it is touching if it is hidden. You'll need to change your script logic - only hide if it's not touching sprite1.

enter image description here

like image 165
Scimonster Avatar answered Dec 05 '25 17:12

Scimonster



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!