Unit 3 Lesson 21 - Alien keeps disappearing

Could someone take a look at my code? Every time my Alien taps the platform it goes away. Not sure if it’s the speed of my computer. Thanks so much.

Ok, this one was a head scratcher because I couldn’t see anything wrong with the code at all. I did figure out it wasn’t a collision issue. When I changed the velocityY, it still disappeared at the same rate, sometimes when the sprite wasn’t anywhere near the platform.

Then, I went into the animation tab and noticed that the alien disappears in the preview tab as well. This indicated to me that it was the sprite animation itself that was the issue. So, I added a different alien and assigned that alien to the player sprite and problem solved.

Honestly, I can’t see what is wrong with the alien animation you are using, there may be a bug there, but that’s the issue. I’ve tried two or three different animations and they all seem to work.

Let us know if that works for you to change the animation.

Best Wishes,

Mike

Thank you so so much:) Ahhhh… I thought I was going crazy… I changed the sprite and it works. You are the best, Mike!

Awesome. Glad you got it to work!

Mike