# Projectiles from Enemies vs Projectiles from Player

**URL:** <https://forum.makecode.com/t/projectiles-from-enemies-vs-projectiles-from-player/16389>\
**Category:** AP CS Principles\
**Tags:** game\
**Created:** [November 17, 2022, 8:51pm UTC](https://forum.makecode.com/t/projectiles-from-enemies-vs-projectiles-from-player/16389 "2022-11-17T20:51:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kroznai](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kroznai/32/6454_2.png) [@kroznai](https://forum.makecode.com/u/kroznai)\
**Post date:** [November 17, 2022, 8:51pm UTC](https://forum.makecode.com/t/projectiles-from-enemies-vs-projectiles-from-player/16389/1 "2022-11-17T20:51:48Z")

</div>

I have a student who wants to have the enemy shoot projectiles at the player and the player shoot projectiles at the enemy.

When the enemy’s projectile hits the player, game over.

However, when the user presses A to create a projectile from player, it’s resulting in a game over.

Is there a way to create projectiles from sprite of a certain kind? Right now all the projectiles are of kind projectile, and we can’t have two kinds (enemyProjectile and playerProjectile).

\*\*Note: right now he’s only using rockBaby as the player, so make your age younger than 18 when you start.

Code: [https://arcade.makecode.com/S59344-68223-45293-17939](https://arcade.makecode.com/S59344-68223-45293-17939)

 ![arcade-screenshot](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/2/24bb3059f8e3b50b125194f0db70d0ab1f8832a8.png)

---

<div class="post-metadata">

**Author:** ![KIKIvsIT](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kikivsit/32/10492_2.png) [@KIKIvsIT](https://forum.makecode.com/u/KIKIvsIT)\
**Post date:** [November 17, 2022, 8:54pm UTC](https://forum.makecode.com/t/projectiles-from-enemies-vs-projectiles-from-player/16389/2 "2022-11-17T20:54:34Z")

</div>

Yes! There’s a “set kind” block for just this occasion. Set one of the projectile kinds to something else (projectile2?) and it should take care of that.

 ![Screenshot by Dropbox Capture](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/d/d2154e959d9d67d3b071dcfc211abb8bc0190835.png)

---

<div class="post-metadata">

**Author:** ![kroznai](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kroznai/32/6454_2.png) [@kroznai](https://forum.makecode.com/u/kroznai)\
**Post date:** [November 17, 2022, 9:39pm UTC](https://forum.makecode.com/t/projectiles-from-enemies-vs-projectiles-from-player/16389/3 "2022-11-17T21:39:01Z")

</div>

Thank you sooo much! This is exactly what we were missing!
