i want to put entity via script on some random point on circle with distance 100 from players base. i used the command to check the spot.
Code: Select all
if (game.get_surface(1).can_place_entity{name = "big-biter", position = {Fin_x, Fin_y}}) then
1. how i can check distance from nearest player building? i found parameter min_player_base_distance in map-setting but do not understand how it works.
2. how i can check that there is a way from my random point to players base (or center of a map). i founded pathfinder in Misanthrope mode but i would prefer to use basic game function.
thank you in advance