Editing Digital Speedo UI app

Discussion in 'Programming' started by gigawert, Apr 16, 2017.

  1. gigawert

    gigawert
    Expand Collapse

    Joined:
    Sep 6, 2015
    Messages:
    2,029
    I am trying to edit the digital air-speedometer UI app to make it a digital altimeter (relative to player's original elevation). I know some C++, which I've heard the game is programmed with, but I can hardly understand this code
    upload_2017-4-16_8-37-49.png

    I would like to do the following:

    -Keep the box that the air speed is kept in

    -Two variables: InitialPlayerZposition (the game's up and down units if you look in the map editor), and currentElevation (the variable that will be displayed in the box)

    -When the app is added or reset, find the z position of the player and assign that value to InitialPlayerZposition. Or let the player input a custom value (maybe)

    -Frequently compare the player's current Z position to InitialPlayerZposition, setting currentElevation to
    current Z position - (minus) InitialPlayerZposition

    Any tips/suggestions on how I can make this simple app? Thanks ;)
     
    #1 gigawert, Apr 16, 2017
    Last edited: Apr 16, 2017
  2. Funky7Monkey

    Funky7Monkey
    Expand Collapse

    Joined:
    Oct 12, 2014
    Messages:
    977
    That's not C++. That's JavaScript. You'll need to learn how JavaScript works, and figure out what stream the player's altitude is.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice