Enemies not dying?

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:

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:

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.

2 Likes