# Help w/ arcade sprite data extension

**URL:** <https://forum.makecode.com/t/help-w-arcade-sprite-data-extension/24996>\
**Category:** Help\
**Created:** [December 11, 2023, 9:58pm UTC](https://forum.makecode.com/t/help-w-arcade-sprite-data-extension/24996 "2023-12-11T21:58:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![BoostedGames](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/boostedgames/32/29419_2.png) [@BoostedGames](https://forum.makecode.com/u/BoostedGames)\
**Post date:** [December 11, 2023, 9:58pm UTC](https://forum.makecode.com/t/help-w-arcade-sprite-data-extension/24996/1 "2023-12-11T21:58:13Z")

</div>

I’m making a game using arcade sprite data and I need help cuz im using it for hp stuff

> **[BEYOND SPACE](https://arcade.makecode.com/S98930-66857-38914-37245)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

also this is for school

---

<div class="post-metadata">

**Author:** ![Luke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/luke/32/32519_2.png) [@Luke](https://forum.makecode.com/u/Luke)\
**Post date:** [December 12, 2023, 5:13pm UTC](https://forum.makecode.com/t/help-w-arcade-sprite-data-extension/24996/2 "2023-12-12T17:13:13Z")

</div>

Well, you should set the “change the sprite data health by x” to a negative number and also remove it from the on game update block. You should also define the sprite data under an “on sprite of kind … created” block

---

<div class="post-metadata">

**Author:** ![BoostedGames](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/boostedgames/32/29419_2.png) [@BoostedGames](https://forum.makecode.com/u/BoostedGames)\
**Post date:** [December 12, 2023, 5:34pm UTC](https://forum.makecode.com/t/help-w-arcade-sprite-data-extension/24996/3 "2023-12-12T17:34:14Z")

</div>

i did but it is still broken

> **[BEYOND SPACE](https://arcade.makecode.com/S65183-52512-73240-93707)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![Luke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/luke/32/32519_2.png) [@Luke](https://forum.makecode.com/u/Luke)\
**Post date:** [December 12, 2023, 7:53pm UTC](https://forum.makecode.com/t/help-w-arcade-sprite-data-extension/24996/4 "2023-12-12T19:53:26Z")

</div>

Maybe try changing the = sign to ≤ incase the health variable is negative?

---

<div class="post-metadata">

**Author:** ![BoostedGames](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/boostedgames/32/29419_2.png) [@BoostedGames](https://forum.makecode.com/u/BoostedGames)\
**Post date:** [December 13, 2023, 5:58pm UTC](https://forum.makecode.com/t/help-w-arcade-sprite-data-extension/24996/5 "2023-12-13T17:58:44Z")

</div>

> **[BEYOND SPACE](https://arcade.makecode.com/S13106-07651-50085-19027)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

it worked… but u can one hit i want it to be three hit

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [December 13, 2023, 6:05pm UTC](https://forum.makecode.com/t/help-w-arcade-sprite-data-extension/24996/6 "2023-12-13T18:05:23Z")

</div>

@BoostedGames the “on sprite created” event won’t work as you’re using it right now, the sprites are being created as Projectile kind and then changed to Enemy, so it won’t ever fire.

Instead, try putting the “set data HP to 3” right below where you are creating the projectile!

Also, inside you’re overlap event I think you have your comparison flipped; you want “health \<= 0” instead of “health \>= 0”

---

<div class="post-metadata">

**Author:** ![BoostedGames](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/boostedgames/32/29419_2.png) [@BoostedGames](https://forum.makecode.com/u/BoostedGames)\
**Post date:** [December 13, 2023, 8:24pm UTC](https://forum.makecode.com/t/help-w-arcade-sprite-data-extension/24996/7 "2023-12-13T20:24:05Z")

</div>

Thank you & @Luke!
