Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Clone Help (!)
- FlappyB2
- Scratcher
8 posts
Clone Help (!)
I've started working on a project that requires the use of clones, and my vars aren't working correctly.
Link
The problem is detecting which clone is clicked. There's supposed to be a var that contains the number of the clone clicked.
It's pretty simple to figure out, but it's not working. Would someone remix/help me out?
Link
The problem is detecting which clone is clicked. There's supposed to be a var that contains the number of the clone clicked.
It's pretty simple to figure out, but it's not working. Would someone remix/help me out?
- townsendbrain
- Scratcher
17 posts
Clone Help (!)
I believe Ive fixed your problem! I put a “wait 1 second” block right after the nested “repeat 8x” block and right above “change clone num by 1”
I think when you try to make all the clones instantaneously your variable just skips immediately to the end (40) and programs them all to be 40 I think its because the clone num script runs faster than the actual cloning.
I think when you try to make all the clones instantaneously your variable just skips immediately to the end (40) and programs them all to be 40 I think its because the clone num script runs faster than the actual cloning.
- townsendbrain
- Scratcher
17 posts
Clone Help (!)
repeat (8)
wait (.1) secs
change [Clone Num v] by (1)
end
I put the “wait” to a tenth of a second and it still worked, hope this is a viable solution!
- drmcw
- Scratcher
1000+ posts
Clone Help (!)
The reason is because you've set the block to run without screen refresh.
- DudmasterUltra
- Scratcher
100+ posts
Clone Help (!)
Thanks for the help guys, it's working now. I removed the custom block, but added a fade effect to have a cool transition. Great!
My Devices
Asus G750JX - 2TB / 16GB RAM / Intel i7 + GeForce GTX 770m / Windows 10
Galaxy S7 Edge - 32GB + 256GB / 4GB RAM / Snapdragon 820 / Android 6.0.1, Stock Unrooted
Galaxy Note 4 - 32GB + 32GB / 3GB RAM / Snapdragon 805 / Android 5.1.1, Stock Unrooted
Google Nexus 9 - 32GB / 2GB RAM / NVIDIA Tegra K1 / Android 6.0.1, Cyanogenmod 13 Rooted
Galaxy Tab S2 - 32GB / 3GB RAM / Exynos 5433 / Android 6.0.1, Stock Rooted + Xposed
Gear Live (Android Wear) - 4GB / 512MB RAM / Snapdragon 400 / Android 6.0.1, Stock Rooted
Fossil Q (Android Wear) - 4GB / 512MB RAM / Intel Atom / Android 6.0.1, Stock
Asus Zenfone 2 - 12GB / 2GB RAM / Intel x86 / Android 6.0.1, Cyanogenmod 13 Rooted
Moto G - 8GB / 1GB RAM / Snapdragon 400 / Android 5.0.2 Stock
(!) Kindle Fire HDX, HD - 32GB / 2GB RAM / Snapdragon 800 / Corrupted operating system
- Discussion Forums
- » Help with Scripts
- » Clone Help (!)