Hello, I am trying to make it so enemies in my game take extra damage when hit in the head. I have tried making a separate sprite to act as a collision box that is centered on the enemies head but the problem is I have multiple of the same enemies spawning and the collision box sprite always centers itself onto the first enemy spawned.
Any help would be appreciated.
It depends how you’re spawning enemies.
You might want to try the stick extension (if you haven’t already). Then when an enemy spawns, create a new hitbox at the enemy’s head and stick it to the enemy.
For enemies: if you’re using the spawner behavior, there is a condition to check if something just spawned, use the create/stick action in that event. If you’re creating them, use the create/stick action in that event. This is just so the box “picks” the newly spawned enemy and doesn’t go to the first one all the time.
Thank you so much! I had no idea about the stick extension
1 Like