Results 1 to 7 of 7

Thread: Where is the location of the player stored?

  1. #1

    Where is the location of the player stored?

    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

  2. #2
    Moderator [FRL]Myke's Avatar
    Join Date
    May 27 2007
    Location
    Yay, Rank 34 of 47119 and catching up.
    Posts
    5,706
    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.

  3. #3
    Quote Originally Posted by [FRL]Myke View Post
    And this site might be of interest for you to get position of any unit, including player.
    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

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

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

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

    Code:
    _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.
    Last edited by cuel; Aug 21 2012 at 10:13.

  5. #5
    Moderator [FRL]Myke's Avatar
    Join Date
    May 27 2007
    Location
    Yay, Rank 34 of 47119 and catching up.
    Posts
    5,706
    Quote Originally Posted by coolboypie View Post
    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.

  6. #6
    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

  7. #7
    Master Gunnery Sergeant twirly's Avatar
    Join Date
    Sep 13 2010
    Location
    Gods Own (NZ)
    Posts
    1,302
    This might be of some use...

    http://forums.bistudio.com/showthrea...47-JayArma2Lib

    ...or an easier way might be to use diag_log to write to the report file and read that file with your program.

    EDIT: Forgot about this... copyToClipBoard
    Last edited by twirly; Aug 21 2012 at 12:42.

    "Learn by doing!" - Quoted from a post by Imutep

    OUTERRA - OUTERRA - OUTERRA - OUTERRA - BLOWMIND!

Similar Threads

  1. Setting random start location for player using markers
    By redmotion in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 4
    Last Post: Jul 5 2010, 11:49
  2. Respawning player in specific location?
    By Garbol87 in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 3
    Last Post: Nov 18 2009, 16:11
  3. Stored MP Missions
    By tobmic in forum ARMA 2 & OA - MULTIPLAYER
    Replies: 1
    Last Post: Aug 4 2009, 08:06
  4. Location of ingame extra player information (P)
    By Jantemplar in forum ARMA 2 & OA : ADDONS - Configs & Scripting
    Replies: 1
    Last Post: Jul 27 2009, 10:57
  5. Real "player" command support Voice + Location
    By bravo 6 in forum ARMA - MISSION EDITING & SCRIPTING
    Replies: 2
    Last Post: Jan 6 2007, 14:49

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •