Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How Do I make a sprite not get clicked if it is hidden
- PewDiePython
-
Scratcher
100+ posts
How Do I make a sprite not get clicked if it is hidden
I am having a problem, I have a sprite that is hidden and only can be clicked if a button is clicked, It is placed directly behind the button, and when I click the button, the sprite also gets clicked. How do I fix it?
- cs4698170
-
Scratcher
1 post
How Do I make a sprite not get clicked if it is hidden
when green flag clicked
say [Do you think you could make the sprite somewhere else?] for (2) secs
if <Yes> then
(answer) Great! Problem solved!
else
I dont know how to help!
end
I mean, maybe you could have the sprite go somewhere else other than behind the play button. I'll check it out and see if I can fix it. Could I have the link to the project please?
Last edited by cs4698170 (May 16, 2020 22:37:37)
- PewDiePython
-
Scratcher
100+ posts
How Do I make a sprite not get clicked if it is hidden
when green flag clicked
say [Do you think you could make the sprite somewhere else?] for (2) secsif <Yes> then
(answer) Great! Problem solved!
else
I dont know how to help!
end
I mean, maybe you could have the sprite go somewhere else other than behind the play button. I'll check it out and see if I can fix it. Could I have the link to the project please?
Here is the project : https://scratch.mit.edu/projects/396111230/
- qrcool
-
Scratcher
1000+ posts
How Do I make a sprite not get clicked if it is hidden
Hmmmmm. Try creating this:
when this sprite clicked
if <[hidden] = [no]> then
Stuuufs
else
Nottthhhing
end
- AnExtremelyLongName
-
Scratcher
48 posts
How Do I make a sprite not get clicked if it is hidden
Hello, PewDiePython. The problem is when
To fix this, under the
broadcast [start v]is broadcasted, the sprite does not have enough delay so it registers the first click as well as the second.
To fix this, under the
when I receive [ start v]hat, put the
wait (0.5) secsBEFORE the
showblock.
- PewDiePython
-
Scratcher
100+ posts
How Do I make a sprite not get clicked if it is hidden
Hello, PewDiePython. The problem is whenbroadcast [start v]is broadcasted, the sprite does not have enough delay so it registers the first click as well as the second.
To fix this, under thewhen I receive [ start v]hat, put thewait (0.5) secsBEFORE theshowblock.
It didn't work.
- AnExtremelyLongName
-
Scratcher
48 posts
How Do I make a sprite not get clicked if it is hidden
Yes it does. Your “Creating Base 1” sprite is showing too fast when the start signal is recieved. Oops!
Change the delay on the “wait 0.5 seconds” to 1 second
Change the delay on the “wait 0.5 seconds” to 1 second
Last edited by AnExtremelyLongName (May 16, 2020 23:13:44)
- RL1123
-
Scratcher
1000+ posts
How Do I make a sprite not get clicked if it is hidden
You could make an empty costume.
- KevinCreator_Test
-
Scratcher
34 posts
How Do I make a sprite not get clicked if it is hidden
You can use a “Stop this scripts” or “Stop others scripts in the sprite” buttons:
Or, you can make this instead:
I CAN'T ASWER HERE, THIS PAGE GLITCH. LEAVE THE “DO NOTHING” IN BLANK
I CAN'T ASWER HERE, THIS PAGE GLITCH. LEAVE THE “DO NOTHING” IN BLANK
hide
stop [this script or others scripts v]
Or, you can make this instead:
hide
set [hide random variable v] to [hide]
when this sprite clicked
if <(hide random variable) = [hide]> then
ask [DO NOTHING HERE] and wait
else
ask [DO SOMETHING HERE] and wait
end
I CAN'T ASWER HERE, THIS PAGE GLITCH. LEAVE THE “DO NOTHING” IN BLANK
I CAN'T ASWER HERE, THIS PAGE GLITCH. LEAVE THE “DO NOTHING” IN BLANK
Last edited by KevinCreator_Test (May 21, 2020 16:20:44)
- PewDiePython
-
Scratcher
100+ posts
How Do I make a sprite not get clicked if it is hidden
You can use a “Stop this scripts” or “Stop others scripts in the sprite” buttons:when green flag clicked
hide
stop [this script or others scripts v]
Or, you can make this instead:when green flag clicked
hide
set [hide random variable v] to [hide]when this sprite clicked
if <(hide random variable) = [hide]> then
ask [DO NOTHING HERE] and wait
else
ask [DO SOMETHING HERE] and wait
end
How do I make something do nothing? Do I just leave it blank?
- Discussion Forums
- » Help with Scripts
-
» How Do I make a sprite not get clicked if it is hidden