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

**URL:** <https://forum.code.org/t/enemy-sprite-not-showing-up-laser-not-working-right-for-student/32527>\
**Category:** Coding and Debugging Help\
**Tags:** csd-unit-3\
**Created:** [April 1, 2020, 8:26pm UTC](https://forum.code.org/t/enemy-sprite-not-showing-up-laser-not-working-right-for-student/32527 "2020-04-01T20:26:07Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![david.decker](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@david.decker](https://forum.code.org/u/david.decker)\
**Post date:** [April 1, 2020, 8:26pm UTC](https://forum.code.org/t/enemy-sprite-not-showing-up-laser-not-working-right-for-student/32527/1 "2020-04-01T20:26:07Z")

</div>

> **[Check out what I made](https://studio.code.org/projects/gamelab/je5ksdd6mMwkg1py3xPzdPpCNrIT3o3-_4710dErBvQ)**
>
> I wrote the code myself with Code.org

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!

---

<div class="post-metadata">

**Author:** ![edavis](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/edavis/32/4927_2.png) [@edavis](https://forum.code.org/u/edavis)\
**Post date:** [April 1, 2020, 10:22pm UTC](https://forum.code.org/t/enemy-sprite-not-showing-up-laser-not-working-right-for-student/32527/2 "2020-04-01T22:22:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mwood](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/mwood/32/4941_2.png) [@mwood](https://forum.code.org/u/mwood)\
**Post date:** [April 2, 2020, 2:29pm UTC](https://forum.code.org/t/enemy-sprite-not-showing-up-laser-not-working-right-for-student/32527/3 "2020-04-02T14:29:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![heikex007](https://avatars.discourse-cdn.com/v4/letter/h/f9ae1b/32.png) [@heikex007](https://forum.code.org/u/heikex007)\
**Post date:** [April 3, 2020, 6:37am UTC](https://forum.code.org/t/enemy-sprite-not-showing-up-laser-not-working-right-for-student/32527/4 "2020-04-03T06:37:55Z")

</div>

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

My email [is:55070095@qq.com](mailto:is:55070095@qq.com)

Looking forward to your reply.

---

<div class="post-metadata">

**Author:** ![david.decker](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@david.decker](https://forum.code.org/u/david.decker)\
**Post date:** [April 3, 2020, 12:11pm UTC](https://forum.code.org/t/enemy-sprite-not-showing-up-laser-not-working-right-for-student/32527/5 "2020-04-03T12:11:28Z")

</div>

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…”

---

<div class="post-metadata">

**Author:** ![david.decker](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@david.decker](https://forum.code.org/u/david.decker)\
**Post date:** [April 3, 2020, 12:25pm UTC](https://forum.code.org/t/enemy-sprite-not-showing-up-laser-not-working-right-for-student/32527/6 "2020-04-03T12:25:26Z")

</div>

> **[Check out what I made](https://studio.code.org/projects/gamelab/VL60fZmV8e7XEOweC-cpMKgEJ2K_IlbDNGk0T4idCPw)**
>
> I wrote the code myself with Code.org

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

---

<div class="post-metadata">

**Author:** ![melynn](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/melynn/32/4925_2.png) [@melynn](https://forum.code.org/u/melynn)\
**Post date:** [April 3, 2020, 1:41pm UTC](https://forum.code.org/t/enemy-sprite-not-showing-up-laser-not-working-right-for-student/32527/7 "2020-04-03T13:41:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![david.decker](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@david.decker](https://forum.code.org/u/david.decker)\
**Post date:** [April 3, 2020, 2:06pm UTC](https://forum.code.org/t/enemy-sprite-not-showing-up-laser-not-working-right-for-student/32527/8 "2020-04-03T14:06:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![david.decker](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@david.decker](https://forum.code.org/u/david.decker)\
**Post date:** [April 3, 2020, 4:29pm UTC](https://forum.code.org/t/enemy-sprite-not-showing-up-laser-not-working-right-for-student/32527/9 "2020-04-03T16:29:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![melynn](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/melynn/32/4925_2.png) [@melynn](https://forum.code.org/u/melynn)\
**Post date:** [April 3, 2020, 5:45pm UTC](https://forum.code.org/t/enemy-sprite-not-showing-up-laser-not-working-right-for-student/32527/10 "2020-04-03T17:45:35Z")

</div>

Oh that’s great!  
Michelle

---

<div class="post-metadata">

**Author:** ![erlynn.luna](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@erlynn.luna](https://forum.code.org/u/erlynn.luna)\
**Post date:** [April 29, 2020, 3:59am UTC](https://forum.code.org/t/enemy-sprite-not-showing-up-laser-not-working-right-for-student/32527/11 "2020-04-29T03:59:19Z")

</div>

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