Working on a karate platformer, think Kung Fu Master where multiple enemies are approaching the player from both sides...
When my player kicks, I spawn hitBox sprite overlapping the player's leg, with a 1-frame animation with speed of 60. My logic is:
- when enemies(family) on collision with hitbox
- kill enemy
- destroy hitbox
I want the kick to only hit one enemy, even if the kick animation and its collision polygon collides with multiple enemies (e.g., when multiple enemies overlap). However it kills all enemies that collide with the hitbox. I even moved the logic to a subevent with a 'trigger once' condition but with the same result.
Any suggestions on how to make this work, or better logic given the situation?
Thanks