# Enemies not dying?

**URL:** <https://forum.makecode.com/t/enemies-not-dying/22827>\
**Category:** Help\
**Tags:** game, make\
**Created:** [September 27, 2023, 5:19pm UTC](https://forum.makecode.com/t/enemies-not-dying/22827 "2023-09-27T17:19:19Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Vegz78](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/vegz78/32/1201_2.png) [@Vegz78](https://forum.makecode.com/u/Vegz78)\
**Post date:** [September 30, 2023, 9:21am UTC](https://forum.makecode.com/t/enemies-not-dying/22827/3 "2023-09-30T09:21:25Z")

</div>

Hi @Arexcl,

It seems that when sprites are set _relative to camera_, like you here do with the _Weapon_ sprite so that it is always in the correct relative position to the _TorchSprite_ sprite, they are also set to _Ghost_ mode, i.e. no hitbox.

I have updated your code here, where I only have removed _relative to camera_ for the weapon, and instead update its position for every game loop inside an _OnGameUpdate_ block to the same x and y postion as _TorchSprite_:

> **[Inferno\_WeaponUpdate](https://arcade.makecode.com/74983-68007-66900-13428)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

This quick n’ dirty solution seems to work well enough to me, but according to this discussion, there is a small nuance between wether to do this before or after the camera updates, which you could control to a finer degree by using the _Sprite Utils_ extension:

> [@Creating a UI (Overlay) - Relative to camera - without ghosting the sprites](https://forum.makecode.com/t/creating-a-ui-overlay-relative-to-camera-without-ghosting-the-sprites/8268/5):
>
> The easiest way to do this would be to not use “relative to camera”, but instead position the sprites on every frame yourself! We have some camera blocks in the scene category that are useful for this. One note: this won’t work inside an “on game update” because the camera doesn’t get updated until after that code gets run. Luckily, I added a block to @jwunderl’s jwunderl/arcade-sprite-util to make this easier: Here’s a link to the example: [https://make…](https://makecode.com/_9FkEaFey5eC9)

I am unsure if this can be solved by other means as well, like reactivating the hitbox periodically or otherwise. That would be a question for a more experienced forum member.

---

_[View the full topic](https://forum.makecode.com/t/enemies-not-dying/22827)._
