Hi, Phil,
When you make a "copy" in this way, the copy will have
the same "status" characteristics -- e.g. paused, ticking,
mouseDown, or whatever -- as the thing it's copied from.
Thus, if you make a "copy" of blueDot while blueDot is
"ticking", the copy itself will be ticking. And
therefore the copy itself will start propagating copies of *itself*
right away as well. This makes for geometric birth of new
blueDots, all of them ticking away and propagating new copies as fast
as they can.
If you subsequently pause the script of the original blueDot,
that original blueDot will stop making copies. But all the
copies already spawned will merrily keep making *their* copies.
A way out of this would be to use the "stop" button of
the Scripting Controls, which at least will pause *all* the scripts,
whereas pausing the original blueDot leaves all the newborn siblings
ticking.
But because of the geometric growth, I don't think it
well-advised to use a ticking script to do this. If you want to
follow the "copy" approach, it's better either to trigger
the "copy" script manually the requisite number of times, or
to use an instance variable for counting down, so that you can run the
script precisely the number of times you wish.
But please note that there are better ways to make repeating
patterns. One cool and easy way is:
* Draw the blue dot that you want to use for your repeating
pattern, and leave it on the squeak desktop, to be "grabbed"
in the final step.
* Obtain a new Rectangle from Supplies. Make it quite
large so that you can easily view the effect about to happen.
* From the rectangles's halo menu, choose "fill
style"... "bitmap fill".
* The rectangle will now be filled with a strange repeating
pattern.
* Now return to the rectangle's halo menu, choose
"fill style" again, and this time choose "grab new
graphic", and then use the mouse to "drag-through" the
area you want to comprise the repeating pattern -- in this case, the
blue dot you've just drawn, allowing suitable white space around it to
yield the spacing you want in the repeating pattern.
You probably won't get things looking exactly the way you want
the first time you do the previous step, but keep trying. Very
nice effects can be had with very little effort in this manner.
Hope this helps,
-- Scott
There are some qu
At 9:37 PM -0400 5/12/03, Phil Firsenbaum wrote:
In attempting to create a pattern
consisting of a series of dots I drew an initial dot and used the Copy
tile (found in miscellaneous category) followed by forward
#.
If i set this script to ticking and stop
it after 6 dots appear, dots will continue to be created across the
screen and I'll also have multiple dots on top of each other. What's
going on here? The script doesn't appear to be recursive, yet it's
behaving as if it were.