# Multiplyer with two projectiles

**URL:** <https://forum.makecode.com/t/multiplyer-with-two-projectiles/1259>\
**Category:** Arcade\
**Created:** [February 24, 2020, 11:16am UTC](https://forum.makecode.com/t/multiplyer-with-two-projectiles/1259 "2020-02-24T11:16:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sofiania](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sofiania/32/21889_2.png) [@sofiania](https://forum.makecode.com/u/sofiania)\
**Post date:** [February 24, 2020, 11:16am UTC](https://forum.makecode.com/t/multiplyer-with-two-projectiles/1259/1 "2020-02-24T11:16:11Z")

</div>

Hi! Does anyone have a suggestion how to solve this:

Two players (on one meowbit each with cable). They each have a player that shoots projectiles on each other. If one player hits the other it should gain 1 point and the other player should loose one life, and vice versa. Problem comes to the projectile as the code below doesn’t work… (I tried to call them projectile and projectile 2). Help!

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/5546ecff0dc25122f979b83799ff943946f78380.png)

---

<div class="post-metadata">

**Author:** ![sofiania](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sofiania/32/21889_2.png) [@sofiania](https://forum.makecode.com/u/sofiania)\
**Post date:** [February 24, 2020, 12:04pm UTC](https://forum.makecode.com/t/multiplyer-with-two-projectiles/1259/2 "2020-02-24T12:04:00Z")

</div>

Ok, answering myself… just saw there’s a new extension for this [https://github.com/distintiva/pxt-real-multiplayer](https://github.com/distintiva/pxt-real-multiplayer). Guess that’s what I needed 🙂

---

<div class="post-metadata">

**Author:** ![jwunderl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jwunderl/32/5308_2.png) [@jwunderl](https://forum.makecode.com/u/jwunderl)\
**Post date:** [February 24, 2020, 6:15pm UTC](https://forum.makecode.com/t/multiplyer-with-two-projectiles/1259/3 "2020-02-24T18:15:03Z")

</div>

The issue here is that both of the projectile sprites you create are of kind `Projectile`, so the second overlap is the only one that would occur (and would occur immediately whenever player2 fires).

To change this, you can use the `set mySprite kind to Player` block, which is right below the overlap events in the toolbox:

 ![Screen Shot 2020-02-24 at 10.11.30 AM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/2eba46485bf2471e78d941450000ffb73e51bead.png)

this will change the kind of the projectile, so you would want to put it in the `on player 2 a button pressed` event after the create projectile block, so that it immediately changes the kind of that sprite.

---

<div class="post-metadata">

**Author:** ![sofiania](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sofiania/32/21889_2.png) [@sofiania](https://forum.makecode.com/u/sofiania)\
**Post date:** [February 25, 2020, 8:06am UTC](https://forum.makecode.com/t/multiplyer-with-two-projectiles/1259/4 "2020-02-25T08:06:13Z")

</div>

Oh, great, I’ll try that! Thank you

---

<div class="post-metadata">

**Author:** ![sofiania](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sofiania/32/21889_2.png) [@sofiania](https://forum.makecode.com/u/sofiania)\
**Post date:** [February 25, 2020, 12:28pm UTC](https://forum.makecode.com/t/multiplyer-with-two-projectiles/1259/5 "2020-02-25T12:28:10Z")

</div>

Tested it, and now it works like I wanted! Thanks again
