Discuss Scratch

R-ty_dragon1
Scratcher
28 posts

Please Help Me With My Script

I am looking to create a project where a variable changes every 24 hours. Is this possible with cloud variables or do I have to have my project always running to change every 24 hours. It's alright if it changes at a certain time. Please can someone help me, it is crucial for the game to work. Thank You! (If anyone helps me, you'll get a follow if it works!)

I Am R-ty_dragon1! On on youtuber (same name)! Go subscribe or i'll eat your cookie! Do It Now!!!! (Click Here) TY!
deck26
Scratcher
1000+ posts

Please Help Me With My Script

Why not just use the days since 2000 block? Set your variable to that value minus a fixed value and it will change every 24 hours.
R-ty_dragon1
Scratcher
28 posts

Please Help Me With My Script

@deck26 Please could you put that in code like this please:
turn cw (5) degrees

I Am R-ty_dragon1! On on youtuber (same name)! Go subscribe or i'll eat your cookie! Do It Now!!!! (Click Here) TY!
R-ty_dragon1
Scratcher
28 posts

Please Help Me With My Script

deck26 wrote:

Why not just use the days since 2000 block? Set your variable to that value minus a fixed value and it will change every 24 hours.
See my previous answer the one i just sent

I Am R-ty_dragon1! On on youtuber (same name)! Go subscribe or i'll eat your cookie! Do It Now!!!! (Click Here) TY!
moob10293
Scratcher
42 posts

Please Help Me With My Script

try
if <not <(☁ day) = (days since 2000)>> then
change variable
set (☁ day) to (days since 2000)
end
it only runs when a person uses the project, though

this is a signiture
nothing to see here
deck26
Scratcher
1000+ posts

Please Help Me With My Script

moob10293 wrote:

try
if <not <(☁ day) = (days since 2000)>> then
change variable
set (☁ day) to (days since 2000)
end
it only runs when a person uses the project, though
You'd want to use something like ‘floor of days since 2000’ though. It includes fractions of days so the stored value would never be the same - by the time the value has been stored on the cloud it has already changed.

But you don't even need a cloud variable.

([floor v] of (days since 2000))
will change every 24 hours and is based on UTC (same as GMT).

Powered by DjangoBB