Discuss Scratch

PowerBro135
Scratcher
68 posts

Christmas Countdown Tutorial

Here's how to make a Christmas Countdown.
Add these scripts to the stage:
define Calculate Days In Month
if <(current [month v]) = [1]> then
set [Days in Month v] to [31]
end
if <(current [month v]) = [2]> then
if <[Leap Years v] contains (current [year v]) ?> then
set [Days in Month v] to [29]
else
set [Days in Month v] to [28]
end
end
if <(current [month v]) = [3]> then
set [Days in Month v] to [31]
end
if <(current [month v]) = [4]> then
set [Days in Month v] to [30]
end
if <(current [month v]) = [5]> then
set [Days in Month v] to [31]
end
if <(current [month v]) = [6]> then
set [Days in Month v] to [30]
end
if <(current [month v]) = [7]> then
set [Days in Month v] to [31]
end
if <(current [month v]) = [8]> then
set [Days in Month v] to [31]
end
if <(current [month v]) = [9]> then
set [Days in Month v] to [30]
end
if <(current [month v]) = [10]> then
set [Days in Month v] to [31]
end
if <(current [month v]) = [11]> then
set [Days in Month v] to [30]
end
if <(current [month v]) = [12]> then
set [Days in Month v] to [25]
end

when green flag clicked
Calculate Days In Month :: custom
forever
set [Months v] to ((12) - (current [month v]))
set [Days v] to ((Days in Month) - (current [date v]))
set [Hours v] to ((24) - (current [hour v]))
set [Minutes v] to ((60) - (current [minute v]))
set [Seconds v] to ((60) - (current [second v]))
if <<(current [month v]) = [12]> and <(current [date v]) > [24]>> then//this detects if it's between Christmas Eve and New Year's
set [Days v] to [0]::variables
hide variable [Seconds v]
hide variable [Minutes v]
hide variable [Hours v]
hide variable [Days v]
hide variable [Months v]
switch backdrop to [On Xmas v]
stop [this script v]
else
show variable [Seconds v]
show variable [Minutes v]
show variable [Hours v]
show variable [Days v]
show variable [Months v]
switch backdrop to [countdown v]
end
end

when green flag clicked//optional
forever
play sound [holiday music v] until done
wait (1) secs
end
If you want snow, then
when green flag clicked
clear
hide
set size to (10) %
forever
create clone of [myself v]
wait (pick random (0.03) to (0.09)) secs
end

when I start as a clone
go to x: (pick random (-220) to (220)) y: (170)
change size by (pick random (0) to (3))
set [ghost v] effect to (pick random (0) to (10))
show
forever
change y by (-3)
change x by (pick random (-1) to (1))
if <(y position) = [-175]> then
stamp
delete this clone
end
if <<touching color [#fff] ?> and <(pick random (1) to (10)) = [1]>> then
stamp
delete this clone
end
if <<touching color [#ffff01] ?> and <(pick random (1) to (10)) = [1]>> then
stamp
delete this clone
end
if <<touching color [#010101] ?> and <(pick random (1) to (10)) = [1]>> then
stamp
delete this clone
end
if <<touching color [#ff0101] ?> and <(pick random (1) to (10)) = [1]>> then
stamp
delete this clone
end
if <<touching color [#0f5] ?> and <(pick random (1) to (10)) = [1]>> then
stamp
delete this clone
end
if <<touching color [#0140ff] ?> and <(pick random (1) to (10)) = [1]>> then
stamp
delete this clone
end
end

when [space v] key pressed
clear
delete this clone
Congratulations! You have made a Christmas countdown!
deck26
Scratcher
1000+ posts

Christmas Countdown Tutorial

Tutorials tend to get lost here. Much better to let those needing help post new topics and respond when you can help.

Your post is also a bit confusing - why the colour touching blocks for example?
DominoDragon1
Scratcher
1000+ posts

Christmas Countdown Tutorial

PowerBro135 wrote:

Here's how to make a Christmas Countdown.
_snip_
Try creating a project, the title is: How to make Christmas Countdown.
PowerBro135
Scratcher
68 posts

Christmas Countdown Tutorial

DominoDragon1 wrote:

Try creating a project, the title is: How to make Christmas Countdown.

I'd need the ‘save picture of scripts’ feature brought back.
katiescratchss
New Scratcher
2 posts

Christmas Countdown Tutorial

Hello! For the sprite do we need text?
[quote][/quote]
Nezon
Scratcher
1000+ posts

Christmas Countdown Tutorial

katiescratchss wrote:

Hello! For the sprite do we need text?
[quote][/quote]
Please don't necropost.

Necropost

Last edited by Nezon (Nov. 18, 2020 16:23:41)

moigam
Scratcher
1000+ posts

Christmas Countdown Tutorial

You could put this in the “show and tell” area.
moigam
Scratcher
1000+ posts

Christmas Countdown Tutorial

Sorry, I didn't know this was old.
katiescratchss
New Scratcher
2 posts

Christmas Countdown Tutorial

what is necropost
costlycoyote
Scratcher
45 posts

Christmas Countdown Tutorial

what you just did. Necroposting is replying to an old topic. For example, this is a necropst.
Paddle2See
Scratch Team
1000+ posts

Christmas Countdown Tutorial

Hello! It's great that you want to help out other Scratchers. However, I think we have enough guides in the forums at the moment. Please feel free to welcome new Scratchers on the group welcoming topic or on individual topics created by New Scratchers.

Other places that can always use more helpful Scratchers like you, are the "Help With Scripts“ and ”Questions About Scratch" areas - please use them as designed, by responding to topics created by folks with problems to solve

Finally, a really good place for Scratch guides is the Scratch Wiki - check it out and see if it's something you might like to work on. They have a number of guides - and great organization.

Powered by DjangoBB