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

How to get Town Locations

Recommended Posts

Can someone please let me know how I can get a list of all Town locations names, and select a random one ?

Basically i am trying to spawn some OPFOR into a random town, but did not want to place markers all over the map if i can already use Town markers.

Thanks

Share this post


Link to post
Share on other sites

Perhaps try something like:

_towns = nearestLocations [getPosATL player, ["NameVillage","NameCity","NameCityCapital"], 25000];

_RandomTownPosition = position (_towns select (floor (random (count _towns))));

//optional also for more randomization:

_posX = (_RandomTownPosition select 0) + (random 200) - (random 200);
_posY = (_RandomTownPosition select 1) + (random 200) - (random 200);

_MoreRandomTownPosition = [_posX,_posY,0];

Share this post


Link to post
Share on other sites

Hi everyone!

I want to use the names of existing (BIS) locations on the map, but I can not know what the "name of location."

I found only one example on this issue in the wiki: NameLocation = name myLocation;

What expression displays?

Thanks

Share this post


Link to post
Share on other sites

This is an old thread but I had an additional question to it...

 

I'm trying to pull All Cities' name and location. But when I use the recommended code I get NameVillage, X,Y...instead of something like Georgetown, X,Y. I can't dynamically set all city and villages as a location the player can teleport to without the proper name to teleport them with.

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  

×