Discuss Scratch

squabblethebat
Scratcher
47 posts

high score script

https://scratch.mit.edu/projects/1121218258/
every time I lose it puts it as the points I lost at but I want it to stay as the top score and not go down and stay as the greater number
HopperSpaniel
Scratcher
60 posts

high score script

Yeah so instead of having a script to stop all in that sprite say stop other scripts in sprite and then in the backdrop put this script:

whenclickedforeverifscore>worldrecordthenset☁ world recordtoscore
TumblerV2
Scratcher
100+ posts

high score script

HopperSpaniel wrote:

Yeah so instead of having a script to stop all in that sprite say stop other scripts in sprite and then in the backdrop put this script:

whenclickedforeverifscore>worldrecordthenset☁ world recordtoscore
This works, however I made this same mistake:

deck26 wrote:

source
But don't try to update cloud variables too quickly. If the score could increase within 0.1 seconds of the previous increase you risk breaking the time limit for writing to the cloud - you need to allow 0.1 seconds between cloud updates, even to different variables.
There is an easy fix:

foreverifscore>worldrecordthenset☁ world recordtoscorewait0.1seconds This solves the problem
HopperSpaniel
Scratcher
60 posts

high score script

TumblerV2 wrote:

HopperSpaniel wrote:

Yeah so instead of having a script to stop all in that sprite say stop other scripts in sprite and then in the backdrop put this script:

whenclickedforeverifscore>worldrecordthenset☁ world recordtoscore
This works, however I made this same mistake:

deck26 wrote:

source
But don't try to update cloud variables too quickly. If the score could increase within 0.1 seconds of the previous increase you risk breaking the time limit for writing to the cloud - you need to allow 0.1 seconds between cloud updates, even to different variables.
There is an easy fix:

foreverifscore>worldrecordthenset☁ world recordtoscorewait0.1seconds This solves the problem
Oh ok cool! Thanks for the correction

Powered by DjangoBB