Multiplayer shooting

I am trying to make a 1v1 multiplayer, but can’t seem to make the projectiles do anything when they hit the opponent; it just says error. Does anyone know how to fix this?

I think the reason that it isn’t doing anything is because you don’t have any code for what happens when the projectile overlaps. With the projectile, it doesn’t automatically just do something when it overlaps a sprite. What you need is this block:

And then inside of it you can have whatever you want happen.

1 Like

I have tried that, but it doesn’t work, and the game won’t load.

The reason for this is that you are using it incorrectly. Because there are errors, it won’t start the program. You don’t put the sprite name in the overlap code, and the reason for this is because it is sprite of kind (), and not a specific sprite. Whatever type of sprite laser_cannon1 is is what you would put there at the top instead of the sprite name. Same goes for the mySprite2. Afterwards, to destroy the projectile, all you have to do is destroy sprite. It should look like this:

(The error there is just due to some lag I was having and not an actual problem with the code)
Makecode can be confusing, but it’s a great coding platform once you learn it. Hope this works for you!

ok, thanks!