Reputation: 41
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:
Which puts it on top of the puppy sprite.
And when the page is advanced (this is in an arrow sprite):
This message is received by each necklace:
My whole project is here.
Upvotes: 3
Views: 2839
Reputation: 61
Well, here's a small hint that will probably make you realise your mistake! If all the necklaces are receiving m11
then which necklaces will disappear? Well, still stumped? I will tell you. If all the necklaces are receiving m11
then all of them will disappear! So, you will need to alter the script to make the necklace currently on the dog show, but hide the rest!
Upvotes: -1
Reputation: 33409
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.
Upvotes: 6