Jump to content
Sign in to follow this  
Dielos

Name of locations in map

Recommended Posts

Hello, I'm trying to figure out how to get the names of the locations in Chernarus. I haven't found anything yet searching through the forums and I might not be understanding the wiki correctly. I've tried the following:

_nearestCity = nearestLocation [getPos player, "NameVillage"];
hint format["Distance to %1 of type %2: %3", name _nearestCity, type _nearestCity, Player distance locationPosition _nearestCity];

It gives me the info on the nearest location to the player of type "NameVillage". It gives me a correct distance and type, but the name of the location stays empty but gives no error! As the wiki says, each location has several variables, and one of them is "name". Why is it not showing? Am I forgetting to initialize something before or what am I doing wrong?

Functions Module is in the map and initialised...

Thanks!

Share this post


Link to post
Share on other sites

Use text _nearestCity instead of name _nearestCity.

Xeno

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  

×