Discuss Scratch

Pintyj
Scratcher
2 posts

need to remove spaces between clones

https://scratch-mit-edu.ezproxyberklee.flo.org/projects/1137389115/
Does anyone have any ideas on how to improve this code?

Last edited by Pintyj (Feb. 22, 2025 00:39:48)

GarbagePanda
Scratcher
77 posts

need to remove spaces between clones

when I start as a clone
change [nclone v] by (1)
add (x position) to [xclone v]
set [nclone v] to (length of [xclone v]::data)
forever
move (-8) steps
название блока::custom
end
Try changing the move block for the clones slightly.
Pintyj
Scratcher
2 posts

need to remove spaces between clones

GarbagePanda wrote:

when I start as a clone
change [nclone v] by (1)
add (x position) to [xclone v]
set [nclone v] to (length of [xclone v]::data)
forever
move (-8) steps
название блока::custom
end
Try changing the move block for the clones slightly.
Thank you, so I need to set the speed as a multiple of 8. How is this mathematically justified? Also, I would like to change the speed variable, so this is not exactly the best option.
10goto10
Scratcher
500+ posts

need to remove spaces between clones

I didn’t see your code before you changed it but is there a chance that you were trying to place the leftmost clone off of the screen? Number 7 in my pitfalls studio is a simple project showing a problem with drawing a circle that goes offscreen.

If that happens in your project then the xclone list might produce x positions that are not evenly spaced.

Powered by DjangoBB