Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Please Help Me With My Script
- R-ty_dragon1
-
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!
![](http://cdn.scratch.mit.edu/scratchr2/static/__77eda0bd25e75486c03d77d0554b9586__/djangobb_forum/img/smilies/smile.png)
- deck26
-
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
-
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!
![](http://cdn.scratch.mit.edu/scratchr2/static/__77eda0bd25e75486c03d77d0554b9586__/djangobb_forum/img/smilies/smile.png)
- R-ty_dragon1
-
28 posts
Please Help Me With My Script
See my previous answer the one i just sent 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.
I Am R-ty_dragon1! On on youtuber (same name)! Go subscribe or i'll eat your cookie! Do It Now!!!! (Click Here) TY!
![](http://cdn.scratch.mit.edu/scratchr2/static/__77eda0bd25e75486c03d77d0554b9586__/djangobb_forum/img/smilies/smile.png)
- moob10293
-
42 posts
Please Help Me With My Script
try
if <not <(☁ day) = (days since 2000)>> thenit only runs when a person uses the project, though
change variable
set (☁ day) to (days since 2000)
end
this is a signiture
nothing to see here
- deck26
-
1000+ posts
Please Help Me With My Script
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. tryif <not <(☁ day) = (days since 2000)>> thenit only runs when a person uses the project, though
change variable
set (☁ day) to (days since 2000)
end
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).
- Discussion Forums
- » Help with Scripts
-
» Please Help Me With My Script