Challenge:
Make your own computer program using 2Code
Output
print to screen
sound
alert
Input
get input
prompt for input
Control
timer
if
if/else
repeat
repeat until
repeat over
restart
launch
Events
collision detection
when clicked
when swiped
when key
hotspot enter
hotspot leave
Create and change variables
create variable
change variable
create function
call function
Objects
background
walls
countdown
Time
Time2
Score
santa
gift4
gift1
gift3
gift2
function
?
Enter comment here
alert
'Oh dear! Santa has dropped some gifts. Use the arrow keys or swipe, to help Santa control his reindeer and collect the fallen gifts. How many can you collect before the time runs out? '
Enter comment here
countdown
value
set to
30
Enter comment here
timer
every
1
seconds
Enter comment here
countdown
value
subtract
1
Enter comment here
if
countdown
value
equals
0
then
Enter comment here
timer
every
1
seconds
Enter comment here
countdown
value
set to
0
Enter comment here
alert
'Game Over! You saved '
+
Score
value
+
' presents, well done and Seasons Greetings!'
Enter comment here
santa
hide
Enter comment here
background
image
set to
Enter comment here
when swiped
background
left
Enter comment here
santa
left
Enter comment here
when swiped
background
right
Enter comment here
santa
right
Enter comment here
when swiped
background
up
Enter comment here
santa
up
Enter comment here
when swiped
background
down
Enter comment here
santa
down
Enter comment here
when key
↑
Enter comment here
santa
up
Enter comment here
when key
↓
Enter comment here
santa
down
Enter comment here
when key
←
Enter comment here
santa
left
Enter comment here
when key
→
Enter comment here
santa
right
Enter comment here
when
santa
collides with
gift1
Enter comment here
gift1
hide
Enter comment here
Score
value
add
1
Enter comment here
timer
after
1
seconds
Enter comment here
gift1
x
set to
random
from
1
to
30
Enter comment here
gift1
y
set to
random
from
1
to
30
Enter comment here
gift1
show
Enter comment here
when
santa
collides with
gift3
Enter comment here
gift3
hide
Enter comment here
Score
value
add
1
Enter comment here
timer
after
1
seconds
Enter comment here
gift3
x
set to
random
from
1
to
30
Enter comment here
gift3
y
set to
random
from
1
to
30
Enter comment here
gift3
show
Enter comment here
when
santa
collides with
gift4
Enter comment here
gift4
hide
Enter comment here
Score
value
add
1
Enter comment here
timer
after
1
seconds
Enter comment here
gift4
x
set to
random
from
1
to
30
Enter comment here
gift4
y
set to
random
from
1
to
30
Enter comment here
gift4
show
Enter comment here
gift4
down
Enter comment here
when
santa
collides with
gift2
Enter comment here
gift2
hide
Enter comment here
Score
value
add
1
Enter comment here
timer
after
1
seconds
Enter comment here
gift2
x
set to
random
from
1
to
30
Enter comment here
gift2
y
set to
random
from
1
to
30
Enter comment here
gift2
show
Move tab
Delete tab
Add new tab
Ok
Variable Watch
Make your own computer program using 2Code
Drag commands and objects from the left into the code window.