# Hp Decrease and More Help

**URL:** <https://forum.makecode.com/t/hp-decrease-and-more-help/36172>\
**Category:** Help\
**Created:** [April 27, 2025, 5:21pm UTC](https://forum.makecode.com/t/hp-decrease-and-more-help/36172 "2025-04-27T17:21:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wolf](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/wolf/32/21783_2.png) [@Wolf](https://forum.makecode.com/u/Wolf)\
**Post date:** [April 27, 2025, 5:21pm UTC](https://forum.makecode.com/t/hp-decrease-and-more-help/36172/1 "2025-04-27T17:21:52Z")

</div>

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](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…

---

<div class="post-metadata">

**Author:** ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)\
**Post date:** [April 27, 2025, 7:36pm UTC](https://forum.makecode.com/t/hp-decrease-and-more-help/36172/2 "2025-04-27T19:36:35Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Wolf](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/wolf/32/21783_2.png) [@Wolf](https://forum.makecode.com/u/Wolf)\
**Post date:** [April 28, 2025, 5:22pm UTC](https://forum.makecode.com/t/hp-decrease-and-more-help/36172/3 "2025-04-28T17:22:53Z")

</div>

Okayy,Thank you
