Distance between enemy and player:
distance(enemy.x, enemy.y, player.x, player.y)
Angle from enemy to player (to shoot bullets):
angle(enemy.x, enemy.y, player.x, player.y)
Or use Line Of Sight behavior if you also need to take into account obstacles. You can set maximum distance for Line of Sight.