I have an attack button in my game and when I press it my character attacks. Cool right. Yeah I know.
Anyway I want to find a way of detecting which of the enemies is closest to my player so my attack animation/sprite sheet will trigger for that enemy. Anyone have any ideas? I’m thinking that I make the collision box on my player very location specific so it obvious which enemy will be attacked and have a variable triggered that way.
What do you guys think? [import]uid: 26289 topic_id: 14387 reply_id: 314387[/import]
[import]uid: 3826 topic_id: 14387 reply_id: 53165[/import]