Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Fast clones / slow clones
- stuffandting
- Scratcher
1 post
Fast clones / slow clones
Hi
Just recently started with Scratch (though I'm comfortable with programming/scripting). I have a slightly odd symptom. I have a sprite which I am cloning. In this example each instance draws a 4-sided box (thing Mystify screensaver in Windows 95…). So each one can draw itself, and I clone multiple on startup. If I do this: -
It works fine, but is obviously pretty lame code. So I use a loop: -
…and it works fine, but everything is much slower. I've tried adding small and large waits within the loop in case it's to do with them all spawing at exactly the same time, but it doesn't make a difference.
Any idea what's causing this?
Thanks
Just recently started with Scratch (though I'm comfortable with programming/scripting). I have a slightly odd symptom. I have a sprite which I am cloning. In this example each instance draws a 4-sided box (thing Mystify screensaver in Windows 95…). So each one can draw itself, and I clone multiple on startup. If I do this: -
when green flag clicked
create clone of [myself v]
create clone of [myself v]
create clone of [myself v]
create clone of [myself v]
create clone of [myself v]
create clone of [myself v]
create clone of [myself v]
create clone of [myself v]
create clone of [myself v]
create clone of [myself v]
It works fine, but is obviously pretty lame code. So I use a loop: -
when green flag clicked
repeat (10)
create clone of [myself v]
end
…and it works fine, but everything is much slower. I've tried adding small and large waits within the loop in case it's to do with them all spawing at exactly the same time, but it doesn't make a difference.
Any idea what's causing this?
Thanks
- levtey
- Scratcher
100+ posts
Fast clones / slow clones
Lag to sense that you have to repeat and repeat so many times.
- Discussion Forums
- » Help with Scripts
- » Fast clones / slow clones