Sprite scores offscreen

How can I make it so that when an enemy disappears from the left side of the screen, the score decreases by 1 and the sprite then destroyes itself?

4 Likes

For the destroying part you could add a


Press the “X” and change it to lifespan

Then you change the number to what how long it takes for it to auto destroy. (You have to write the time in milliseconds: 1 second= 1000 milliseconds)

Just take the x pos and run some code if it’s less than 0.

do a sprite like a stick, put it in position and then do the code so when the enemy overlaps the stick score changes and the enemy sprite disappears.

here i made an example for you
just change the code a bit for your needs and your good to go!

btw welcome and i like your username! (my little sister is OBSESSED with macgyver)

1 Like

Can I see your game I am bad at explaining. Btw, Welcome

Great, thanks!