Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How to make my sprites disappear when clicked
- lt210
-
New Scratcher
15 posts
How to make my sprites disappear when clicked
With each fishes scripts, I've got ‘set, continue to 1’ for when they are clicked when asked for. But when the fisherman asks for numbers, some of the fish keep saying their numbers which never happened before! And then, instead of following the broadcasts, it goes straight to asking for number 3. Im sorry if that just answered what I'm saying, but I find this so very confusing! And am desperate to understand it!!!
- deck26
-
Scratcher
1000+ posts
How to make my sprites disappear when clicked
Here's a remix - http://scratch.mit.edu/projects/39751426/ which I think is close to what you want. I think all my changes are in the fisherman2 scripts. All I've done is reset continue to 0 after each fish (otherwise the next fish script sees continue=1 even before you click on it) and changed the broadcast at the end of next6 to call next7 instead of No7.
This is actually looking good for a new scratcher so well done. You'll learn that you can reuse a lot of code though so you don't need to repeat what is largely the same code over and over. If you want me to remix a bit more on that basis let me know.
This is actually looking good for a new scratcher so well done. You'll learn that you can reuse a lot of code though so you don't need to repeat what is largely the same code over and over. If you want me to remix a bit more on that basis let me know.
- lt210
-
New Scratcher
15 posts
How to make my sprites disappear when clicked
Thank you SO much! That is such a great help. I now see where the issue was, so thank you! I didn't know that you could reuse it rather than repeating it over and over! Probably would have saved me a lot of time! Thank you for the help. Very much appreciated
- lt210
-
New Scratcher
15 posts
How to make my sprites disappear when clicked
Thank you for your second remix - looks much easier than when I first did it! I will adapt mine once it is finished - which it nearly is. Just having one last problem - for the last bit i want them to appear back in the aquarium, still. I have set it for when they ‘receive end of game’ ‘go to x-, y-’ ‘show’ but they keep swimming as they did at sea!
http://scratch.mit.edu/projects/39754934/
http://scratch.mit.edu/projects/39754934/
- deck26
-
Scratcher
1000+ posts
How to make my sprites disappear when clicked
Thank you for your second remix - looks much easier than when I first did it! I will adapt mine once it is finished - which it nearly is. Just having one last problem - for the last bit i want them to appear back in the aquarium, still. I have set it for when they ‘receive end of game’ ‘go to x-, y-’ ‘show’ but they keep swimming as they did at sea!The script for each fish that makes it move contains a forever loop. This probably needs to be a repeat until. You may need a variable to indicate the game is over and the fish only move until that variable has the appropriate value.
http://scratch.mit.edu/projects/39754934/
- lt210
-
New Scratcher
15 posts
How to make my sprites disappear when clicked
Brilliant. Thank you again for the help!
- lt210
-
New Scratcher
15 posts
How to make my sprites disappear when clicked
Please could you remix one of the fish for me and the fisherman so I can see where the variables need to be put. I put them where I thought made sense, but where I put them, they stopped moving completely!!
- deck26
-
Scratcher
1000+ posts
How to make my sprites disappear when clicked
Please could you remix one of the fish for me and the fisherman so I can see where the variables need to be put. I put them where I thought made sense, but where I put them, they stopped moving completely!!OK, I'm looking at it.
- deck26
-
Scratcher
1000+ posts
How to make my sprites disappear when clicked
OK this version is based on my earlier remix so may not reflect some of your recent changes - http://scratch.mit.edu/projects/39759024
I've modified the fisherman and fish1 and used a gameover variable to show when the game is over (gameover=0 still going; gameover=1 done). I also added a broadcast to the end of fisherman2 to signal the game is over.
Looks to me like you're virtually there.
I've modified the fisherman and fish1 and used a gameover variable to show when the game is over (gameover=0 still going; gameover=1 done). I also added a broadcast to the end of fisherman2 to signal the game is over.
Looks to me like you're virtually there.
Last edited by deck26 (Dec. 16, 2014 15:29:35)
- skrillexdude
-
Scratcher
4 posts
How to make my sprites disappear when clicked
when this sprite clicked
broadcast [ v]
- deck26
-
Scratcher
1000+ posts
How to make my sprites disappear when clicked
Please don't necropostwhen this sprite clicked
broadcast [ v]
- beeutiful101
-
Scratcher
36 posts
How to make my sprites disappear when clicked
Guys, they just want to make you confused! This is the real easy way for doing it.
Drlshmael:
Note:
Dear Scratchers(@1207769,@deck26,) that make things so hard for starting Scratchers,
I just wanna say that, you barely make things easy or a little bit simple! It's kind of annoying all of a sudden. It's too hard to figure out, and it's too long and sleep-looking, spending there long time doing a long script at @http://scratch.mit.edu/discuss scratch.And they're so poor and tired of all of the hard work.I feel so bad for 'em.
Love,
beeutiful101
Drlshmael:
when this sprite clicked
hide
Note:
Dear Scratchers(@1207769,@deck26,) that make things so hard for starting Scratchers,
I just wanna say that, you barely make things easy or a little bit simple! It's kind of annoying all of a sudden. It's too hard to figure out, and it's too long and sleep-looking, spending there long time doing a long script at @http://scratch.mit.edu/discuss scratch.And they're so poor and tired of all of the hard work.I feel so bad for 'em.
Love,
beeutiful101
- deck26
-
Scratcher
1000+ posts
How to make my sprites disappear when clicked
Guys, they just want to make you confused! This is the real easy way for doing it.Try reading the text of the post, not just the subject line. That script will make it hide regardless of whether it is the correct fish. None of us make it any more difficult than it has to be. If the script you gave was a valid response it would have been exactly what I'd have suggested.
Drlshmael:when this sprite clicked
hide
Note:
Dear Scratchers(@1207769,@deck26,) that make things so hard for starting Scratchers,
I just wanna say that, you barely make things easy or a little bit simple! It's kind of annoying all of a sudden. It's too hard to figure out, and it's too long and sleep-looking, spending there long time doing a long script at @http://scratch.mit.edu/discuss scratch.And they're so poor and tired of all of the hard work.I feel so bad for 'em.
Love,
beeutiful101
This topic is now old and should be considered closed.
- bwahman64
-
Scratcher
66 posts
How to make my sprites disappear when clicked
when green flag clicked
forever
if <<touching [mouse-pointer v] ?> and <<mouse down?> >> then
hide
end
end
- deck26
-
Scratcher
1000+ posts
How to make my sprites disappear when clicked
As for my answer above - please read the whole topic, not just the title. Your solution wouldn't meet their needs which were answered more than a year ago.when green flag clicked
forever
if <<touching [mouse-pointer v] ?> and <<mouse down?> >> then
hide
end
end
- kitten9898
-
Scratcher
1 post
How to make my sprites disappear when clicked
How do you get the … block?
- deck26
-
Scratcher
1000+ posts
How to make my sprites disappear when clicked
How do you get the … block?There is no ‘…’ block. It was used in one post to indicate that the coder needs to put in the appropriate information at that point.
Please don't necropost - this topic is very old. You could have copied the relevant post from this topic and referred to it in a new topic. You're much more likely to get help if you start your own topic rather than necroposting which tends to confuse things and get people replying to something that has been dealt with quite some time ago.
- jd112349
-
Scratcher
2 posts
How to make my sprites disappear when clicked
im trying to do the same but with clouds
- Zorohh
-
Scratcher
100+ posts
How to make my sprites disappear when clicked
when this sprite clicked
hide
…self explanatory…
- Discussion Forums
- » Help with Scripts
-
» How to make my sprites disappear when clicked







