Discuss Scratch

Hooateme
Scratcher
29 posts

How do you stop a sprite from being clickable after it got clicked?

I've tried for a like a couple hours now and I still can't figure it out. Can anyone help me with this?

when this sprite clicked
repeat (2)
glide (0.01) secs to x: (10) y: (10)
glide (0.01) secs to x: (0) y: (0)
glide (0.01) secs to x: (10) y: (-10)
glide (0.01) secs to x: (-10) y: (10)
glide (0.01) secs to x: (-10) y: (0)
glide (0.01) secs to x: (0) y: (10)
glide (0.01) secs to x: (0) y: (-10)
end
next costume

But if you spam click this it glitches out and breaks the costumes and shaking mechanic. see in in my project here: https://scratch.mit.edu/projects/471109046/editor it is under sprite 1. If you have any ideas please tell me I'm so done with this stupid easy code that has proven to be my hardest challenge ever. Thanks!

Last edited by Hooateme (Feb. 25, 2022 20:28:03)

The_White_Totoro
Scratcher
5 posts

How do you stop a sprite from being clickable after it got clicked?

Hello sir, I believe I have a simple but working answer!

Do something like this:

when this sprite clicked
if <(ready to be clicked) = [1]> then
set [ready to be clicked] to [0]
go to x: (the places) y: (the places)
set [ready to be clicked] to [1]
next costume
end
The_White_Totoro
Scratcher
5 posts

How do you stop a sprite from being clickable after it got clicked?

oh and add the repeat block enclosing the go to places block
Hooateme
Scratcher
29 posts

How do you stop a sprite from being clickable after it got clicked?

The_White_Totoro wrote:

Hello sir, I believe I have a simple but working answer!

Do something like this:

when this sprite clicked
if <(ready to be clicked) = [1]> then
set [ready to be clicked] to [0]
go to x: (the places) y: (the places)
set [ready to be clicked] to [1]
next costume
end
This has broken it more sorry, but I will save it so you can see what it did and maybe test something? I know not that much about scratch I have self taught myself it and I'm pretty bad. Thanks for trying. I also tried something very similar and it didn't work. It seems to have no fix somehow but I hope there's something.

Last edited by Hooateme (Feb. 25, 2022 21:09:22)

Powered by DjangoBB