Jump to content
Sign in to follow this  
coolboypie

Where is the location of the player stored?

Recommended Posts

Hiya!

Im wanting to make a bit of a mod for the game where it will find the location of the player and show where they are on a map (which will be on a different computer).

BUT i have a problem at step 1. i dont know how to get the value of the in game GPS or the location of the player, or where that value is stored.

could anyone help me?

my Friend hosts a DayZ server and he says the coordinates the server give him are in the form of: 6000, 1100 which doesnt help me at all.

so, second question: what would those coordinates be in ingame coordinates (so how can i convert them)?

Thanks

Share this post


Link to post
Share on other sites

This is a editing question therefor this thread is moved to the correct section.

And this site might be of interest for you to get position of any unit, including player. ;)

Share this post


Link to post
Share on other sites
Myke;2211340']And this site might be of interest for you to get position of any unit' date=' including player. ;)[/quote']

I don't this this would work as it's for in game scripting, do you know if the location is stored somewhere locally on the client computer?

Thanks

Share this post


Link to post
Share on other sites

You can get any positions of any object, they're not stored locally.

To convert a position array you can use the mapGridPosition command.

_pos = mapGridPosition player;
hint format ["Map position: %1", _pos];

or

_pos = getPos player;
// _pos is now an array with [X,Y,Z] information.
_mapPos = mapGridPosition _pos;
hint format ["Map position: %1", _mapPos];

"Player" is local to each client. If you want to find the location of another object, just change player to whatever the name of the object you're trying to find is.

The grid position on the map is just a visual for players to make it easier to identify for themselves and others where they are. It's not what the engine uses for positions, and thus needs to be converted.

Edited by cuel

Share this post


Link to post
Share on other sites
I don't this this would work as it's for in game scripting, do you know if the location is stored somewhere locally on the client computer?

Thanks

Simple answer: no.

Since you're about to make a mod, scripting shouldn't be a issue. Maybe explaining a bit more about what kind of mod you want to create could give you better since more detailed answers.

Share this post


Link to post
Share on other sites

Sorry, i'll try and be as clear as possible:

What im wanting to do it make a mod that will take the coordinates of the player from the game and then write it to a text file. from the text file i will create another program to read it and show where the coordinates are on a map.

the second part i've almost nailed i just need help with the first part. i thought that it might be stored in the ram somewhere but no luck there.

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  

×