Hp Decrease and More Help

i am new to this and I was trying to make a basic,normal battle game kind off thing and this is what is done till now https://arcade.makecode.com/S23265-09250-66672-43759 , i am confused on how to make the Hp decrease When one presses A at a reasonable distance…

2 Likes

Usually people use one sprite for the player, and another for the attack. That way you can make the health go down if the attack sprite hits the other player, but not if it’s only the player sprite touching.

I would just make a new temporary sprite in front of the player, when the button is pressed, with a little slash animation that syncs up with the sword animation, and then the health can decrease only if the slash animation sprite hits the other player! Maybe you can make the two slash sprites destroy each other if they touch, so that you can block attacks and stuff! Many possibilities here, have fun!

2 Likes

Okayy,Thank you

1 Like