How do I make "Strong bricks"?

I’m making a breakout clone.

I want to make Bricks, or in my case “Jellies” that pop in 3 hits…
I think I might be on to something but…I can’t quite get it to work right.
As it is right now once the ball pops one the rest become solid.
And, my variable counts for the Jellies as a whole…so if the ball bounces off one strong Jelly, thats a downed HP for ALL the strong jellies. But only the one that’s hit by the ball changes animation, and only the last one that’s hit by the ball is deleted. How do I fix this?

Unless this is intended, use object variables so each jelly has its own HP.
And putting the main event inside the for each loop should help too.

Oh my goodness, thank you! I’m new to coding and didn’t know that that was a thing, but I figured it out very quickly after you sent that. Thank you for guiding me to the right path!

1 Like