Discuss Scratch
- Discussion Forums
- » Suggestions
- » create clone of my self {} C block
- Codigador
-
Scratcher
80 posts
create clone of my self {} C block
Hi,
I know that exists a block that creates a clone of a sprite, but some times we want to make scratch do something that the clone does before the script continues.
for example:
I know that exists a block that creates a clone of a sprite, but some times we want to make scratch do something that the clone does before the script continues.
for example:
define clone at (x) (y) [quantity]But, instead of doing this, i a C block exists, we can run some code before the next code, also,
set [x v] to (x)
set [y v] to (y)
create clone of [myself v]
set [quantity v] to (quantity)
wait (0.001) secs//the suggestion is done to avoid this. It can take more than 0.001 because scratch can not wait a so few time
when I receive [setup v]
clone at (100) (100) [triple]
clone at (150) (200) [single]
when I start as a clone
switch costume to (quantity)
define clone at (x) (y) [quantity]This also avoids an extra variable, quantity
set [x v] to (x)
set [y v] to (y)
run on new clone{
switch costume to (quantity)
} :: control
when I receive [setup v]
clone at (100) (100) [triple]
clone at (150) (200) [single]
Last edited by Codigador (Aug. 10, 2020 20:57:44)
- scratchastroLOL
-
Scratcher
1000+ posts
create clone of my self {} C block
to make it less longer and confusing, what about renaming it to:
run in new clone {} :: control- Discussion Forums
- » Suggestions
-
» create clone of my self {} C block