Welcome to Keen Software House Forums! Log in or Sign up to interact with the KSH community.
  1. You are currently browsing our forum as a guest. Create your own forum account to access all forum functionality.

Anyway to get ship coordinates?

Discussion in 'Programming Questions and Suggestions' started by Semaphorism, Jan 2, 2015.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. Semaphorism Apprentice Engineer

    Messages:
    186
    I am just wondering if there are a way to get the ships coordinates using the programmable blocks?
    Would be super useful.
     
  2. shimonu Apprentice Engineer

    Messages:
    394
  3. CyberVic Apprentice Engineer

    Messages:
    106
    Since you posted this in the IN-GAME programming area, I'll answer your question unlike the last guy.

    ;-)

    Code:
    <div>            var blocks = GridTerminalSystem.Blocks;
                int X = blocks[0].Position.X;
                int Y = blocks[0].Position.Y;
                int Z = blocks[0].Position.Z;
    </div>
     
    Last edited by a moderator: Jan 2, 2015
  4. Volfram Senior Engineer

    Messages:
    1,564
    Shows what I know. I thought the Position value would be in grid-space, not world-space.

    So this makes GPS and automatic navigation possible. Have to include those when upgrading my courier drone.
     
  5. Arcturus Senior Engineer

    Messages:
    1,649
    Correct. The integer position values are on the grid. The worldspace position value is a float.
     
  6. se5a Apprentice Engineer

    Messages:
    113
    Actualy, shimonu's Link is correct. Is there a way to view a workshop script without booting into the game though?
     
Thread Status:
This last post in this thread was made more than 31 days old.