Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    Logging player sprite distance

    Beginners
    2
    5
    180
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • waldron
      waldron F last edited by

      A nice simple way to log distance in maps, want to track players distance

      pianofire 1 Reply Last reply Reply Quote 0
      • pianofire
        pianofire Fuze Team @waldron last edited by

        @waldron Distance from where to where? Do you mean total distance travelled?

        There is a distance function https://fuzearena.com/help/view/distance which gives you the distance between two points. You will have to keep track of the previous and current position and measure it periodically.

        waldron 1 Reply Last reply Reply Quote 1
        • waldron
          waldron F @pianofire last edited by

          @pianofire yeah total distance traveled, i do believe you'v found my answer cheers.
          side note iv got my title screen, game screen to end screen sorted now but if i keep pressing (a) through the screens the sprites are multiplying do i just delete them to null
          sprites

          1 Reply Last reply Reply Quote 0
          • pianofire
            pianofire Fuze Team last edited by

            It depends. You can create your sprites up front (before your game loop) and just make them invisible or off screen when not required or you can create them as you need them and get rid of them. Make sure that you use removeSprite to get rid of unwanted sprites or you will get memory leaks.

            waldron 1 Reply Last reply Reply Quote 1
            • waldron
              waldron F @pianofire last edited by

              @pianofire remove sprite did it :) iv now got title screen to menu then game and end screen it finally clicked

              1 Reply Last reply Reply Quote 1
              • First post
                Last post