Created
August 5, 2014 14:38
-
-
Save nathan/98a73b2d0824f1bbf81b to your computer and use it in GitHub Desktop.
Project summary of http://scratch.mit.edu/projects/15832807/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stage | |
===== | |
Variables | |
--------- | |
- n = 30 | |
- last mouse x = 227 | |
- last mouse y = 180 | |
- pen size = 2 | |
- clones = 30 | |
Backdrops | |
--------- | |
- backdrop1 | |
Sounds | |
------ | |
- pop | |
Scripts | |
------- | |
when @ clicked | |
forever | |
if <not <<(mouse x) = (last mouse x)> and <(mouse y) = (last mouse y)>>> then | |
reset timer | |
set [last mouse x v] to (mouse x) | |
set [last mouse y v] to (mouse y) | |
end | |
if <(timer) > [1]> then | |
hide variable [n v] | |
else | |
show variable [n v] | |
end | |
end | |
when @ clicked | |
forever | |
set [pen size v] to (round ((10) / ([sqrt v] of (n)))) | |
end | |
when [up arrow v] key pressed | |
change [n v] by (1) | |
when [down arrow v] key pressed | |
change [n v] by (-1) | |
Dot. | |
==== | |
Variables | |
--------- | |
- da = 0 | |
Costumes | |
-------- | |
- costume1 | |
Sounds | |
------ | |
- meow | |
Scripts | |
------- | |
when @ clicked | |
pen up | |
set pen shade to (50) | |
set pen size to (4) | |
set pen color to [6109137 v] | |
clear | |
set [clones v] to [0] | |
go | |
forever | |
if <(clones) < (n)> then | |
create clone of [_myself_ v] | |
end | |
end | |
when I start as a clone | |
change [clones v] by (1) | |
go to x: (0) y: (100) | |
point in direction (90) | |
set pen size to (pen size) | |
pen down | |
forever | |
move (round (([sqrt v] of (pen size)) * (8))) steps | |
turn @ (da) degrees | |
if <touching [_edge_ v] ?> then | |
if on edge, bounce | |
set [da v] to (pick random (0) to (10)) | |
change pen color by (1) | |
end | |
set pen size to (pen size) | |
end | |
when I start as a clone | |
forever | |
if <(clones) > (n)> then | |
change [clones v] by (-1) | |
delete this clone | |
end | |
end | |
define go | |
repeat (n) | |
create clone of [_myself_ v] | |
end | |
clear | |
when I start as a clone | |
forever | |
wait (8) secs | |
repeat (80) | |
change pen color by (0.5) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment