Jump to content
Sign in to follow this  
1para{god-father}

Work out Size of town

Recommended Posts

Is there a way to work out the size of a town as I need to place a Marker around the whole town.?

_towns = nearestLocations [getPosATL player, ["NameVillage","NameCity","NameCityCapital","StrongPoint"], 25000];
//_towns =  [getPosATL player, ["StrongPoint","FlatAreaCity"], 25000];
_pos = position (_towns select (floor (random (count _towns))));


/////////Create marker////////////////////
_mrk1 = createmarker ["marker_patrol1",_pos];
_mrk1 setmarkershape "ELLIPSE";
_mrk1 setmarkersize [200,200];     ///// ?????How to get correct siez??????????/////////
_mrk1 setMarkerColor "ColorRed";
"marker_patrol1" setMarkerAlpha 1;
Sleep .2;

Share this post


Link to post
Share on other sites

You could use a switch statement and spawn the marker.



_towns = nearestLocations [getPosATL player, ["NameVillage","NameCity","NameCityCapital","StrongPoint"], 25000]; 
//_towns =  [getPosATL player, ["StrongPoint","FlatAreaCity"], 25000]; 
_pos = position (_towns select (floor (random (count _towns))));

sleep 1;

Switch (_Pos) do 

{

                           case "NameVillage": {

                                  _mrk = createmarker ["marker_patrol1",_pos]; 
                                  _mrk setmarkershape "ELLIPSE"; 
                                  _mrk setmarkersize [200,200]; 
                                  _mrk setMarkerColor "ColorRed"; 
                                  "marker_patrol1" setMarkerAlpha 1;

                                }; 

                           case "NameCity": {

                                  _mrk = createmarker ["marker_patrol1",_pos]; 
                                  _mrk setmarkershape "ELLIPSE"; 
                                  _mrk setmarkersize [100,100]; 
                                  _mrk setMarkerColor "ColorRed"; 
                                  "marker_patrol1" setMarkerAlpha 1;

                                 };

                          case "NameCityCapital": {

                                  _mrk = createmarker ["marker_patrol1",_pos]; 
                                  _mrk setmarkershape "ELLIPSE"; 
                                  _mrk setmarkersize [175,175]; 
                                  _mrk setMarkerColor "ColorRed"; 
                                  "marker_patrol1" setMarkerAlpha 1;

                                       };

                         case "StrongPoint": {

                                  _mrk = createmarker ["marker_patrol1",_pos]; 
                                  _mrk setmarkershape "ELLIPSE"; 
                                  _mrk setmarkersize [150,150]; 
                                  _mrk setMarkerColor "ColorRed"; 
                                  "marker_patrol1" setMarkerAlpha 1;

                                };


};


Share this post


Link to post
Share on other sites

Thanks, but how would i strip out the Array to just hold the Type as it holds tyhe following at the moment and cannot find the command to just hold the Type ?

Array:-


_towns = nearestLocations [getPosATL player, ["NameVillage","NameCity","NameCityCapital","StrongPoint"], 25000];
_pos = _towns select (floor (random (count _towns)));

Returns

Location NameVillage at 3627, 8511

Thanks

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×