Need Help With my Fighting Game-My First Game

I Need Help with my game. I’ve found a few glitches I need help with and I need help with a few of my ideas. Here are the glitches:
My Fire character’s super disappears when it moves off screen
My Ninja character’s main attack sometimes works, sometimes doesn’t
and (This isn’t really a bug) I can’t figure out hot to make my water characters main attack work (Its supposed to work like Squeak’s main from brawl stars)
Here’s the link: https://arcade.makecode.com/S49213-65487-44574-43630

2 Likes

Try using the debug feature!

Welcome to the Makecode forums! This game is pretty good! I hope you stick around. :blush:

Ok, your first problem is pretty simple. Because you are creating these as projectiles, they have a flag called “auto destroy” on them. This makes them disappear when they exit the screen to prevent lag. To stop this, simply turn the flag off:

Your second issue has to do with something weird happening in that “(distance between (sprite) and (othersprite) )” block. When sprites die, they are still calculated by this block.
This means that if you fire a ninja star and let it come back to you, then you walk far away, that distance block will actually say that you are far enough away from the dead ninja star sprite to run the code and “BoomerangRecharge” will get set to 1. Then, next time you fire, since BoomerangRecharge is 1 the ninja star will instantly get destroyed. To fix this, I simply added an extra check to make sure that a ninja star sprite actually exists that isn’t dead. So BoomerangRecharge gets set to 1 only if the distance is 60 and the ninja star is a non-dead sprite.
I did this by checking that the length of the “array of all sprites of kind [attack4]” is not 0:

1 Like

I believe the fire guys super is disappearing because its a projectile and they usually disappear when offscreen

1 Like

This should fix the Fire guy’s special https://makecode.com/_Jsif0dRHVdsE

You just needed to make it so that it doesn’t auto destroy. I’m not sure what’s wrong with the Ninja though.

1 Like

Thank you @WoofWoof! That worked! But I still need to figure out how to make my water characters (I call him Wave) attack work. its supposed to be like squeaks from brawl stars, and attach to the enemy and then “Explode” and deal damage. I can get it to attach, but if an enemy with the attack attached touches another enemy, the attack just attaches to the other enemy. Also I can’t figure out how to do AOE damage.

1 Like

Also, Any suggestions about like future updates and characters? (P.S I tried to make a shop and skins but it didn’t work out.)

Zap man maybe

You could look at the Sprite Utils extension for that AOE damage. It has a “all sprites within (X) pixels of (sprite)” block you could use. You could use the sprite data extension to help save which sprite is attached to which bomb, or maybe add a “Sprite is attached” flag of some sort, idk. Goodluck!

1 Like