X#=object position x(player)
Y#=object position y(player)
eX#=object position x(Enemy)
eY#=object position y(Enemy)
ReturnX#= x# - eX#
ReturnY#= y# - eY#
If mouseclick and ReturnX# < 5 and ReturnX#>0 and ReturnY# < 5 and ReturnY#>0
Damage_enemy()
endif
Bad idea, Bowser! ^_^
You can't compare the X difference and the Y difference seperately, or you could hurt enemies halfway across the map who just happen to be within 5 units of you on one axis.
Also, with your code, you'd kill all enemies behind you!
"You get what everyone gets, you get a lifetime!" - Death, The Sandman Library
First you Dream, then you ... - Neil Gaiman, 2001