Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • CreatiCode
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

CreatiCode Scratch Forum

  1. CreatiCode Forum
  2. Help
  3. Creating leaderboards with saved variables

Creating leaderboards with saved variables

Scheduled Pinned Locked Moved Help
12 Posts 3 Posters 3.0k Views
  • 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.
  • CreatiCodeI CreatiCode

    @011830-0a42ef84

    Currently, you can use this block to submit a new value for the current user, which will overwrite the old value if the new value is better:

    e42c466b-0256-4f65-8ed0-a84f9d5ffe8e-image.png

    TheNicknameGovT Offline
    TheNicknameGovT Offline
    TheNicknameGov
    trusted helpers
    wrote on last edited by
    #3

    @info-creaticode Is this a premium block? I can’t find it in the game and the AI won’t give it to me.

    I'm back!!!

    CreatiCodeI 1 Reply Last reply
    0
    • TheNicknameGovT TheNicknameGov

      @info-creaticode Is this a premium block? I can’t find it in the game and the AI won’t give it to me.

      CreatiCodeI Offline
      CreatiCodeI Offline
      CreatiCode
      wrote on last edited by
      #4

      @011830-0a42ef84

      It is in the “Game” extension.

      TheNicknameGovT 1 Reply Last reply
      0
      • CreatiCodeI CreatiCode

        @011830-0a42ef84

        It is in the “Game” extension.

        TheNicknameGovT Offline
        TheNicknameGovT Offline
        TheNicknameGov
        trusted helpers
        wrote on last edited by TNG
        #5

        @info-creaticode I’m sorry, but I can’t find the game extension. What are you referring to? If the extensions are the tabs like the sound and motion ones, I don’t see the game one on there.

        d1faa950-443d-4df2-924d-9368dfaa7068-image.png

        I'm back!!!

        CreatiCodeI 1 Reply Last reply
        0
        • TheNicknameGovT TheNicknameGov

          @info-creaticode I’m sorry, but I can’t find the game extension. What are you referring to? If the extensions are the tabs like the sound and motion ones, I don’t see the game one on there.

          d1faa950-443d-4df2-924d-9368dfaa7068-image.png

          CreatiCodeI Offline
          CreatiCodeI Offline
          CreatiCode
          wrote on last edited by
          #6

          @011830-0a42ef84

          You can click this green button on the bottom left to add the “Game” extension:

          fc55cf9a-148c-4cab-ac0d-137acadbd936-image.png

          JaecadeJnightJ TheNicknameGovT 2 Replies Last reply
          1
          • CreatiCodeI CreatiCode

            @011830-0a42ef84

            You can click this green button on the bottom left to add the “Game” extension:

            fc55cf9a-148c-4cab-ac0d-137acadbd936-image.png

            JaecadeJnightJ Offline
            JaecadeJnightJ Offline
            JaecadeJnight
            Mod Helper
            wrote on last edited by
            #7

            @info-creaticode It seems that XO (as shown in the image above) gives blocks but probably in the wrong syntax so it falls back to making a comment block lke “// record player score” which isn’t the same as the actual block “record player score”.

            #LLJW
            <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

            1 Reply Last reply
            0
            • CreatiCodeI CreatiCode

              @011830-0a42ef84

              You can click this green button on the bottom left to add the “Game” extension:

              fc55cf9a-148c-4cab-ac0d-137acadbd936-image.png

              TheNicknameGovT Offline
              TheNicknameGovT Offline
              TheNicknameGov
              trusted helpers
              wrote on last edited by
              #8

              @info-creaticode I figured it out, thank you

              I'm back!!!

              TheNicknameGovT 1 Reply Last reply
              0
              • TheNicknameGovT TheNicknameGov

                @info-creaticode I figured it out, thank you

                TheNicknameGovT Offline
                TheNicknameGovT Offline
                TheNicknameGov
                trusted helpers
                wrote on last edited by
                #9

                @info-creaticode How do you create multiple leaderboards for different things?

                I'm back!!!

                JaecadeJnightJ 1 Reply Last reply
                0
                • TheNicknameGovT TheNicknameGov

                  @info-creaticode How do you create multiple leaderboards for different things?

                  JaecadeJnightJ Offline
                  JaecadeJnightJ Offline
                  JaecadeJnight
                  Mod Helper
                  wrote on last edited by
                  #10

                  @011830-0a42ef84 i believe there is only one leaderboard per game, use a server saved table/database instead that will save user IDs and stats

                  #LLJW
                  <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

                  TheNicknameGovT 1 Reply Last reply
                  0
                  • JaecadeJnightJ JaecadeJnight

                    @011830-0a42ef84 i believe there is only one leaderboard per game, use a server saved table/database instead that will save user IDs and stats

                    TheNicknameGovT Offline
                    TheNicknameGovT Offline
                    TheNicknameGov
                    trusted helpers
                    wrote on last edited by
                    #11

                    @jeffreyrb03-gmail can you help me with that and give me an example? I tried it but I didn’t know how

                    I'm back!!!

                    JaecadeJnightJ 1 Reply Last reply
                    1
                    • TheNicknameGovT TheNicknameGov

                      @jeffreyrb03-gmail can you help me with that and give me an example? I tried it but I didn’t know how

                      JaecadeJnightJ Offline
                      JaecadeJnightJ Offline
                      JaecadeJnight
                      Mod Helper
                      wrote on last edited by jeffreyrb03-gmail
                      #12

                      @011830-0a42ef84 using databases is a tiny bit tricky, but they are basically just tables with strict/enforced columns with types (like number, string, or date) and allow you to store rows in them. It is pretty transaction based kinda like actual databases. For a leaderboard you just need to create a database for a leaderboard, and to get data from it, just display say around 100 rows where a stat like coins is greatest, if you were to show some leaderboard of users with the most coins.

                      I’ll let you tinker around with that first and if you still need help then I would like to see your code and I’ll give working code. I do have a project that demonstrates how to use a database, you’ll have to look in the code though, and what it does it just check if a password you enter is the correct password by asking the database for the password and then checking if the inputted password is equal to the password from the database:

                      the project is in unlisted shared so u can see it
                      https://play.creaticode.com/projects/66f85f2ce228c74a133e1128


                      Hopefully my project doesn’t confuse you more, but all you have to do is just change it up and delete the stuff leftover from my challenge thingie. Instead of using the database to store one singular piece of text, you can use it to store multiple rows like a table and in the end, you could use that database to make a leaderboard of your own and shows what you want.

                      The columns it should be storing are (user id), found in Sensing, and then any variables.

                      #LLJW
                      <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

                      1 Reply Last reply
                      0

                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                      With your input, this post could be even better 💗

                      Register Login
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • CreatiCode