# I need help on a boomerang code

**URL:** <https://forum.makecode.com/t/i-need-help-on-a-boomerang-code/10503>\
**Category:** Help\
**Created:** [October 20, 2021, 3:27pm UTC](https://forum.makecode.com/t/i-need-help-on-a-boomerang-code/10503 "2021-10-20T15:27:28Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Codeboy-Advanced](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/codeboy-advanced/32/11113_2.png) [@Codeboy-Advanced](https://forum.makecode.com/u/Codeboy-Advanced)\
**Post date:** [October 20, 2021, 3:27pm UTC](https://forum.makecode.com/t/i-need-help-on-a-boomerang-code/10503/1 "2021-10-20T15:27:28Z")

</div>

> **[Boomerang](https://arcade.makecode.com/18134-49493-56009-84353)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

Im making a dungeon crawler with a boomerang that gets more and moore powerful throughout the game but i cant make the boomerang come back or even make it rotate! I want the boomerang to come back if it goes some set distance away or when it hits a wall. How can I do this?

---

<div class="post-metadata">

**Author:** ![TheJaky](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/thejaky/32/5711_2.png) [@TheJaky](https://forum.makecode.com/u/TheJaky)\
**Post date:** [October 21, 2021, 1:22am UTC](https://forum.makecode.com/t/i-need-help-on-a-boomerang-code/10503/2 "2021-10-21T01:22:15Z")

</div>

Hmmm… I have an idea! Try this extension called sprite utils.

jwunderl/arcade-sprite-util

(also to use it you have to copy and paste the link into the search bar over the extensions in the extensions tab)

It has a block that fits into the logic blocks where if distance between one sprite and another is this, then… and then make the boomerang’s direction go in that of the player’s.

I hope this helps a little bit!

---

<div class="post-metadata">

**Author:** ![TheJaky](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/thejaky/32/5711_2.png) [@TheJaky](https://forum.makecode.com/u/TheJaky)\
**Post date:** [October 21, 2021, 1:22am UTC](https://forum.makecode.com/t/i-need-help-on-a-boomerang-code/10503/3 "2021-10-21T01:22:19Z")

</div>

Oh and for the wall thing just do if is the boomerang sprite hitting wall then do this, and the this part is the code to make it come back. I don’t exactly know what to do for that, so I’m sorry if this isn’t really a concrete solution

---

<div class="post-metadata">

**Author:** ![TheJaky](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/thejaky/32/5711_2.png) [@TheJaky](https://forum.makecode.com/u/TheJaky)\
**Post date:** [October 21, 2021, 1:22am UTC](https://forum.makecode.com/t/i-need-help-on-a-boomerang-code/10503/4 "2021-10-21T01:22:20Z")

</div>

also once you make the boomerang coming back code, you should get the timer extension, it would be useful for simulating it just being one boomerang the character throws (if that’s your intention)

---

<div class="post-metadata">

**Author:** ![Kiwiphoenix364](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kiwiphoenix364/32/14368_2.png) [@Kiwiphoenix364](https://forum.makecode.com/u/Kiwiphoenix364)\
**Post date:** [October 21, 2021, 3:26pm UTC](https://forum.makecode.com/t/i-need-help-on-a-boomerang-code/10503/5 "2021-10-21T15:26:07Z")

</div>

You can use the “set (sprite) follow (sprite)” block and if you press the plus button you can change the speed that it follows you and then while it’s following you do “if sprite of kind (spritekind (probably player)) overlaps othersprite (spritekind (probably boomerang))” and put inside “destroy othersprite”

---

<div class="post-metadata">

**Author:** ![felixtsu](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/felixtsu/32/12024_2.png) [@felixtsu](https://forum.makecode.com/u/felixtsu)\
**Post date:** [October 21, 2021, 3:26pm UTC](https://forum.makecode.com/t/i-need-help-on-a-boomerang-code/10503/6 "2021-10-21T15:26:58Z")

</div>

> **[Boomerang](https://arcade.makecode.com/88331-19752-80747-94547)**
>
> 用❤️创造，Microsoft MakeCode Arcade出品。

It’s always 2 questions to consider:  
a) which instruction(s)  
b) when to run those instruction(s)

for a)

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/9/9706dab279056fb5d1d3eb71a1fa0e3ef33cbedf.png)

for b)

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/e/ebe6691d1a291ec2a44fe14bd2d2366b0d8d54ef.png)  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/7/73af115ee0c915f938fae27c8f8b21acd20b0abe.png)

1. ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/1/1836c4b59d312f34128fdff3bbb4eaefc7cc57ed.png)  
animation is great for rotating ( drawing more frames results in a smoother rotating animation)

Cheers

---

<div class="post-metadata">

**Author:** ![Codeboy-Advanced](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/codeboy-advanced/32/11113_2.png) [@Codeboy-Advanced](https://forum.makecode.com/u/Codeboy-Advanced)\
**Post date:** [October 21, 2021, 3:27pm UTC](https://forum.makecode.com/t/i-need-help-on-a-boomerang-code/10503/7 "2021-10-21T15:27:15Z")

</div>

Thank you I will try all that

---

<div class="post-metadata">

**Author:** ![Kiwiphoenix364](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kiwiphoenix364/32/14368_2.png) [@Kiwiphoenix364](https://forum.makecode.com/u/Kiwiphoenix364)\
**Post date:** [October 22, 2021, 12:58am UTC](https://forum.makecode.com/t/i-need-help-on-a-boomerang-code/10503/8 "2021-10-22T00:58:39Z")

</div>

You can also use the sprite rotation extension.

---

<div class="post-metadata">

**Author:** ![Codeboy-Advanced](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/codeboy-advanced/32/11113_2.png) [@Codeboy-Advanced](https://forum.makecode.com/u/Codeboy-Advanced)\
**Post date:** [October 22, 2021, 4:06pm UTC](https://forum.makecode.com/t/i-need-help-on-a-boomerang-code/10503/9 "2021-10-22T16:06:36Z")

</div>

Do you know any good ones?

---

<div class="post-metadata">

**Author:** ![Kiwiphoenix364](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kiwiphoenix364/32/14368_2.png) [@Kiwiphoenix364](https://forum.makecode.com/u/Kiwiphoenix364)\
**Post date:** [October 22, 2021, 9:12pm UTC](https://forum.makecode.com/t/i-need-help-on-a-boomerang-code/10503/10 "2021-10-22T21:12:54Z")

</div>

[https://github.com/robo-technical-group/pxt-arcade-image-transform](https://github.com/robo-technical-group/pxt-arcade-image-transform) is an extension that I use frequently and I found it on @UnsignedArduino 's list of extensions [(Awesome Arcade Extensions)](https://github.com/UnsignedArduino/Awesome-Arcade-Extensions)

---

<div class="post-metadata">

**Author:** ![Codeboy-Advanced](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/codeboy-advanced/32/11113_2.png) [@Codeboy-Advanced](https://forum.makecode.com/u/Codeboy-Advanced)\
**Post date:** [October 26, 2021, 3:22pm UTC](https://forum.makecode.com/t/i-need-help-on-a-boomerang-code/10503/11 "2021-10-26T15:22:26Z")

</div>

Well I don’t think working on this game alone is very easy. Do anyof you want to be part of a development team? We could have a discord? And we could all help make each others games!

---

<div class="post-metadata">

**Author:** ![Codeboy-Advanced](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/codeboy-advanced/32/11113_2.png) [@Codeboy-Advanced](https://forum.makecode.com/u/Codeboy-Advanced)\
**Post date:** [October 26, 2021, 3:25pm UTC](https://forum.makecode.com/t/i-need-help-on-a-boomerang-code/10503/12 "2021-10-26T15:25:14Z")

</div>

Thanks this is way easier

---

<div class="post-metadata">

**Author:** ![Kiwiphoenix364](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kiwiphoenix364/32/14368_2.png) [@Kiwiphoenix364](https://forum.makecode.com/u/Kiwiphoenix364)\
**Post date:** [October 26, 2021, 5:48pm UTC](https://forum.makecode.com/t/i-need-help-on-a-boomerang-code/10503/13 "2021-10-26T17:48:28Z")

</div>

I don’t think discord is allowed because of the first rule of the community guidelines:

### 1. Don’t over-share

Please no sharing of personally identifiable information on the forum - this includes your **full name** , **email** , **phone number** , etc. We want to protect your privacy. Only MakeCode Team members may directly message forum members. Discussion of meeting up with other forum users on any external services is **prohibited**. This includes (but is not limited to) Instagram, Google Docs, Google Meet, Discord, Among Us, and any other video, audio, or text chat service.

---

<div class="post-metadata">

**Author:** ![TheJaky](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/thejaky/32/5711_2.png) [@TheJaky](https://forum.makecode.com/u/TheJaky)\
**Post date:** [October 27, 2021, 3:11am UTC](https://forum.makecode.com/t/i-need-help-on-a-boomerang-code/10503/14 "2021-10-27T03:11:18Z")

</div>

by the way how is the boomerang code working?

---

<div class="post-metadata">

**Author:** ![TheJaky](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/thejaky/32/5711_2.png) [@TheJaky](https://forum.makecode.com/u/TheJaky)\
**Post date:** [October 27, 2021, 3:11am UTC](https://forum.makecode.com/t/i-need-help-on-a-boomerang-code/10503/15 "2021-10-27T03:11:37Z")

</div>

Also if you want to have other people help on your game you should make the category arcade/collaboration that way people can help you add features to your game, I think that’s the best way that fits within the guidelines

---

<div class="post-metadata">

**Author:** ![TheJaky](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/thejaky/32/5711_2.png) [@TheJaky](https://forum.makecode.com/u/TheJaky)\
**Post date:** [October 27, 2021, 3:11am UTC](https://forum.makecode.com/t/i-need-help-on-a-boomerang-code/10503/16 "2021-10-27T03:11:40Z")

</div>

among us??? REALLY???

---

<div class="post-metadata">

**Author:** ![Codeboy-Advanced](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/codeboy-advanced/32/11113_2.png) [@Codeboy-Advanced](https://forum.makecode.com/u/Codeboy-Advanced)\
**Post date:** [October 27, 2021, 3:12am UTC](https://forum.makecode.com/t/i-need-help-on-a-boomerang-code/10503/17 "2021-10-27T03:12:59Z")

</div>

oh well then this game development will be a bit slower.

---

<div class="post-metadata">

**Author:** ![Codeboy-Advanced](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/codeboy-advanced/32/11113_2.png) [@Codeboy-Advanced](https://forum.makecode.com/u/Codeboy-Advanced)\
**Post date:** [October 27, 2021, 4:08pm UTC](https://forum.makecode.com/t/i-need-help-on-a-boomerang-code/10503/18 "2021-10-27T16:08:38Z")

</div>

The boomerang still won’t come back but it is spinning now! I will go make a collaboration for this game.

---

<div class="post-metadata">

**Author:** ![Kiwiphoenix364](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kiwiphoenix364/32/14368_2.png) [@Kiwiphoenix364](https://forum.makecode.com/u/Kiwiphoenix364)\
**Post date:** [October 27, 2021, 5:36pm UTC](https://forum.makecode.com/t/i-need-help-on-a-boomerang-code/10503/19 "2021-10-27T17:36:27Z")

</div>

> [@Codeboy-Advanced](#):
>
> oh well then this game development will be a bit slower.

Yeah, I didn’t make the rules, but just wanted to make sure you didn’t get flagged or banned.

---

<div class="post-metadata">

**Author:** ![MothAcademy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mothacademy/32/6435_2.png) [@MothAcademy](https://forum.makecode.com/u/MothAcademy)\
**Post date:** [June 24, 2022, 1:18am UTC](https://forum.makecode.com/t/i-need-help-on-a-boomerang-code/10503/20 "2022-06-24T01:18:18Z")

</div>

hi. here is my coding for boomerang. u can try check it out. and have fun!

![arcade-boomerang-grenade](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/3/32fa97ea4693b5799ae4c341555857f412382abd.png)  
[boomerang and hand grenade](https://makecode.com/_5DsWmxPxUir2)
