Projectiles from Enemies vs Projectiles from Player

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

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.

1 Like

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