Leaderboard - displaying full score as decimal time

0 favourites
From the Asset Store
Easy Leaderboard
$10.80 USD
10% off
Easy Leaderboard is a simple 3-column (position, name, score) leaderboard with a customizable appearance
  • Thanks - I thought the same, but there isn't anywhere within the plugin i can see where I can divide the result. This is what I have in my leaderboard sheet:

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I found a line in the c2runtime.js file which said:

    score_ = parseInt(score_);

    I changed this to:

    score_ = parseFloat(score_);

    and now my decimals are showing!!

    Only slight issue now is that it's not always showing two decimal places - so if the score is:

    17.40 it's displayed as 17.4. Is there any way to display it as 17.40?

    Thanks for all your help guys - I got there in the end but wouldn't have without your helpful steers!!

  • I found a line in the c2runtime.js file which said:

    score_ = parseInt(score_);

    I changed this to:

    score_ = parseFloat(score_);

    and now my decimals are showing!!

    Only slight issue now is that it's not always showing two decimal places - so if the score is:

    17.40 it's displayed as 17.4. Is there any way to display it as 17.40?

    Thanks for all your help guys - I got there in the end but wouldn't have without your helpful steers!!

    Try this

    https://www.sizzle-games.com/float_correction.capx

  • Thanks for this! I will give it a go!!

  • Unfortunately I can't see any way to add your code to my leaderboard.

    The leaderboard is generated via a json string into an array by the easyLeaderboard plugin.

    Your code is brilliant - but I just cannot see any way to implement it.

    Below is what i have:

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)