# Lasers?

**URL:** https://forum.makecode.com/t/lasers/20140
**Category:** Help
**Created:** [May 22, 2023, 4:56pm UTC](https://forum.makecode.com/t/lasers/20140 "2023-05-22T16:56:48Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![ChimbroDaPro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/chimbrodapro/32/15852_2.png) [@ChimbroDaPro](https://forum.makecode.com/u/ChimbroDaPro)
#### Post date: [May 22, 2023, 4:56pm UTC](https://forum.makecode.com/t/lasers/20140/1 "2023-05-22T16:56:48Z")

</div>

Hi again everyone!

So I need to make lasers for this game:

> **[Dark vs. Light 7](https://arcade.makecode.com/86676-52824-71477-22384)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

I want the final boss to have lasers that look like this (spoilers for those playing Kirby and the Forgotten Land):

 ![IMG_4907](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/a/a758a4723817f1570b80579c94041e3f6fdf98f2.jpeg)

Anyone know how to attempt this?

---

<div class="post-metadata">

### Author: ![Luke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/luke/32/32519_2.png) [@Luke](https://forum.makecode.com/u/Luke)
#### Post date: [May 22, 2023, 8:13pm UTC](https://forum.makecode.com/t/lasers/20140/2 "2023-05-22T20:13:44Z")

</div>

Also I’ll make an example if you want I struggled to get my head around lines and images a lot :o

---

<div class="post-metadata">

### Author: ![Luke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/luke/32/32519_2.png) [@Luke](https://forum.makecode.com/u/Luke)
#### Post date: [May 22, 2023, 8:13pm UTC](https://forum.makecode.com/t/lasers/20140/3 "2023-05-22T20:13:47Z")

</div>

You can have an invisible sprite that follows the player which the boss will target with the lasers (eg draw the lines to that sprite position). For drawing the lines you can look at the code for catch flies it might help.

---

<div class="post-metadata">

### Author: ![randomuser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/randomuser/32/32505_2.png) [@randomuser](https://forum.makecode.com/u/randomuser)
#### Post date: [May 22, 2023, 8:15pm UTC](https://forum.makecode.com/t/lasers/20140/4 "2023-05-22T20:15:57Z")

</div>

Hmm. My first thought is to make sprites of the lasers and check if they are overlapping the sprite.

---

<div class="post-metadata">

### Author: ![ChimbroDaPro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/chimbrodapro/32/15852_2.png) [@ChimbroDaPro](https://forum.makecode.com/u/ChimbroDaPro)
#### Post date: [May 22, 2023, 9:05pm UTC](https://forum.makecode.com/t/lasers/20140/5 "2023-05-22T21:05:01Z")

</div>

Yes! Please send an example (pls).

---

<div class="post-metadata">

### Author: ![Luke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/luke/32/32519_2.png) [@Luke](https://forum.makecode.com/u/Luke)
#### Post date: [May 24, 2023, 5:41pm UTC](https://forum.makecode.com/t/lasers/20140/6 "2023-05-24T17:41:28Z")

</div>

> **[Lasers!](https://arcade.makecode.com/S48343-96744-18734-91303)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

If you want me to make it more of a burst action I can do that as well

---

<div class="post-metadata">

### Author: ![ChimbroDaPro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/chimbrodapro/32/15852_2.png) [@ChimbroDaPro](https://forum.makecode.com/u/ChimbroDaPro)
#### Post date: [May 24, 2023, 6:56pm UTC](https://forum.makecode.com/t/lasers/20140/7 "2023-05-24T18:56:54Z")

</div>

Wow! This is… really, REALLY close to what I was thinking of. I kind of wanted the blast to disappear afterwards eg. (Sorry again Kirby and the Forgotten Land spoilers! It’s just too good of an example…):

![IMG_4909](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/c/c775ddd87ad3a1f7d578e266e923f91a0a21b562.jpeg)

See, is there a way to add the pulsing effect too? Sorry if it’s too much!

---

<div class="post-metadata">

### Author: ![Luke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/luke/32/32519_2.png) [@Luke](https://forum.makecode.com/u/Luke)
#### Post date: [May 24, 2023, 10:37pm UTC](https://forum.makecode.com/t/lasers/20140/8 "2023-05-24T22:37:37Z")

</div>

> **[Lasers! v2](https://arcade.makecode.com/28988-89368-01640-52055)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

### Author: ![ChimbroDaPro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/chimbrodapro/32/15852_2.png) [@ChimbroDaPro](https://forum.makecode.com/u/ChimbroDaPro)
#### Post date: [May 25, 2023, 3:51pm UTC](https://forum.makecode.com/t/lasers/20140/9 "2023-05-25T15:51:52Z")

</div>

OH MY GOSH THIS IS PERFECT! How can I ever repay you?

---

<div class="post-metadata">

### Author: ![Raccoonux](https://avatars.discourse-cdn.com/v4/letter/r/b5e925/32.png) [@Raccoonux](https://forum.makecode.com/u/Raccoonux)
#### Post date: [December 20, 2024, 5:50pm UTC](https://forum.makecode.com/t/lasers/20140/10 "2024-12-20T17:50:50Z")

</div>

So, I also needed to add lasers to my game, and I tried but failed. I’m not sure what I did wrong ☹  
[https://arcade.makecode.com/S08511-16944-66158-14766](https://arcade.makecode.com/S08511-16944-66158-14766) (Ignore bad name, also free-play is not done yet)

---

<div class="post-metadata">

### Author: ![Raccoonux](https://avatars.discourse-cdn.com/v4/letter/r/b5e925/32.png) [@Raccoonux](https://forum.makecode.com/u/Raccoonux)
#### Post date: [December 20, 2024, 6:38pm UTC](https://forum.makecode.com/t/lasers/20140/11 "2024-12-20T18:38:15Z")

</div>

Wait I got it, my problem was that the Screen sprite was still only 16 by 16 pixels instead of 160 by 120
