Currently im using this:
Code: Select all
if player.reach_distance >= math.abs(entity.position.x - player.position.x) and
player.reach_distance >= math.abs(entity.position.y - player.position.y) then
Code: Select all
if player.reach_distance >= math.abs(entity.position.x - player.position.x) and
player.reach_distance >= math.abs(entity.position.y - player.position.y) then