Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » need to remove spaces between clones
- Pintyj
-
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?
Does anyone have any ideas on how to improve this code?
Last edited by Pintyj (Feb. 22, 2025 00:39:48)
- GarbagePanda
-
77 posts
need to remove spaces between clones
when I start as a cloneTry changing the move block for the clones slightly.
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
- Pintyj
-
2 posts
need to remove spaces between clones
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.when I start as a cloneTry changing the move block for the clones slightly.
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
- 10goto10
-
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.
If that happens in your project then the xclone list might produce x positions that are not evenly spaced.
- Discussion Forums
- » Help with Scripts
-
» need to remove spaces between clones