Issue with the Animation library and "Is Touching Sprite"

What's problem you are encountering?
Replacing the "change X" block with the "animate: X-position" makes the script not responsive. I mean, it renders the script unusable. The balloons don't explode on contact with the sprite.

What have you tried that didn't work?
Tried replacing one block with one from the Animation library

Post a project example, link, or screenshot:

Link:

https://snap.berkeley.edu/project?user=test19230&project=OpenSap%20-%20get%20coding%20-%20w2%20unit%206%20-%20Putting%20it%20all%20Together%20-%20Make%20it%20Pop

Works:

Doesn't work:

It works for me - changed to 0.1 sec as 1 sec was too slow for my attention span :slight_smile:

Balloons wobble to the top and then disappear or I can shoot them and they explode

image

Well, there is no problem with the block. Its just when your making it animate, the rest of the script doesn't run until the animation is done. This is why when @cymplecy changed the animation speed...

The balloon popped because it is checking if it is touching the turtle sprite more often. To have the balloon effect, you can use this script:

Thanks @cymplecy, that worked.
I will work on ways to improve the sway. Maybe will need to create a separate block.

:joy:

@joecooldoo sorry missed your post,
will try your solution, many thanks!


Edit: That was it, needed to use Launch so the script didn't wait for the animation to end.
Thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.