Counter Pattern

Hi! I am trying to combine counter patterns for the y-position and scale to make a car driving away get smaller so it looks realistic. Once the car reaches about 200 in the y-position, it turns around and drives back upside down like a boomerang. I can’t figure out how to get it to keep getting smaller until it disappears. I ended up using and if statement and the destroy command once it reaches 200 but it does not look realistic. Any advice? My code is attached.

@mckiernk,

You can get it to disappear by changing your if block to detect when scale < 0. You can also make it invisible by using sprite.visible = false (instead of destroy) if you want, but in your example, it looks like the car is climbing the mountains before it disappears, so my best guess is that you will have to just play the the values you decrease the y position by and/or the values you change the scale by until you get the look you are after.

Not sure there is a silver bullet here on this one…

Mike

2 Likes

Thanks so much for your suggestion. I changed if to while and played around with the scale.
Still not exactly what I was hoping for, but maybe its not possible without getting too complex for where my students are at right now. Truly appreciate your help!

3 Likes