Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Sprite doesn't run script again if I click it twice.
- Average_Gavin
- Scratcher
2 posts
Sprite doesn't run script again if I click it twice.
Alright, so I am working on a game and when you click on the sprite it will do a little animation before switching the backdrop. But when I click on the sprite mid-animation it kinda just bugs out. In other words, how can I make it so the animation is uninterruptible.
- GrandSabo
- Scratcher
42 posts
Sprite doesn't run script again if I click it twice.
How about something like:
when green flag clicked
set [animation playing? v] to [0]
forever
if <<touching [mouse-pointer v] ?> and <mouse down?>> then
if <(animation playing?) = [0]> then
set [animation playing? v] to [1]
do what you want
set [animation playing v] to [0]
end
end
end
- Discussion Forums
- » Help with Scripts
- » Sprite doesn't run script again if I click it twice.