Enemy Sprite Not Showing Up & Laser Not Working Right For Student

In the above game my 7th grade student is creating, he’s having a hard time getting his lasers to work properly, and for some reason his enemy sprite(s) is not showing up either. Any help with the code would be much appreciated. Thank you!

Hi @david.decker,
Nice to see you on the forum again! I’m not sure what’s not working about the laser. It looks pretty good to me. The enemy ship has a yellow triangle next to it on line 70 in the code. If the student hovers over that triangle he will see a hint to help correct it. Let us know if you still need help.

If the laser isn’t working as expected, let us know what they want it to do. I see it is working, but I’m not sure how they want it to work.

Mike

I am a computer teacher from China. I hope to make friends with you and discuss problems together.

My email is:55070095@qq.com

Looking forward to your reply.

Thank you all for the help! I’m going to copy and paste here what my student emailed me this morning.

“No it is not the Laser that I wanted to fix it’s the enemy ship… I set it up so that the enemy should go directly down… When it does it’s supposed to stop at one point and then gets blown up… It’s supposed to disappear after it’s blown up… And then the blown up part is also supposed to disappear… that’s what I needed help with but if anything I’ll just end up taking the blown up thing out…”

And there is a link to his updated code. Thank you all for your help!

Hi @david.decker and student,

His email is a great pseudocode plan for what he wants to do. I feel like he just needs to break it down and make the transition to code:

  • " I set it up so that the enemy should go directly down":
    I don’t see this right now so problem solve why. I looked at Enemy1.y in the “watch” tool. He is exponentially moving so fast out of the screen, you don’t see him. How can you fix that?

  • “When it does it’s supposed to stop at one point and then gets blown up. It’s supposed to disappear after it’s blown up… And then the blown up part is also supposed to disappear”
    When you slow the enemy down, he does stop at block1 but the timing is not quite right with the explosion. I would think about adding some if statements that include if Enemy1 collision is true, what should then happen to the explosion’s visibility AND IF BOTH THOSE ARE TRUE then what should happen if their visibility (so they disappear).
    I hope those tips are helpful. It is such a great start!

Michelle

Thank you so much! I’ve copied and pasted your reply in an email to the student. I hope that’s okay. It makes me happy to see my students working hard even though we aren’t in school right now.

With your help, my student was able to figure out how to make it work! Thank you all so much!

1 Like

Oh that’s great!
Michelle

Wow! Cool game! Reminded me of Atari game in old times:)