Discuss Scratch
- Discussion Forums
- » Suggestions
- » A c block for clones and for original sprite
- qwerty_wasd_gone
-
1000+ posts
A c block for clones and for original sprite
run for [clones only v]{...}:: control//the other options being "original sprite only" and "original sprite and clones"this could be used for recieving broadcasts that you don't want clones to recieve
when I receive [move v]or could be used for the same thing but for only clones
run for [original sprite only v]{move (10) steps}:: control
when I receive [move v]or could be used for both when you need to run stuff for clones in a green flag script.
run for [clones only v]{move (10) steps}:: control
when green flag clickedAnother use:
create clone of [myself v]
run for [original sprite and clones v]{move (10) steps}:: control
when I start as a clone
...
run for [original sprite only v]{...}:: control//would run this for the original sprite and not clones even though it's in a clone script.
when green flag clicked
create clone of [myself v]
run for [clones only v]{move (10) steps}:: control//not as useful because of a hat block existing but would still work anyway
Q: But what about this? Would it make all clones run that script or just the clone that gets to that block?
when I start as a cloneA: It would be all clones due to how it works in other hat blocks.
if <...> then
run for [clones only v]{...}:: control
end
Q: Well what if we only want the clone that gets to the block to run it?
A: Simple, don't use the block, and the scripts will run only in that clone instead.
Last edited by qwerty_wasd_gone (Oct. 13, 2023 19:30:53)
- blablablahello
-
1000+ posts
A c block for clones and for original sprite
There is a workaround, but unlike other suggestions, this workaround is constantly needed when working with clones, so even though the workaround is simple, it still becomes extremely annoying (especially since you have to add an additional 2-5 vairables PER sprite that uses clones)
- qwerty_wasd_gone
-
1000+ posts
A c block for clones and for original sprite
Is that support? There is a workaround, but unlike other suggestions, this workaround is constantly needed when working with clones, so even though the workaround is simple, it still becomes extremely annoying (especially since you have to add an additional 2-5 vairables PER sprite that uses clones)
- GIitchInTheMatrix
-
1000+ posts
A c block for clones and for original sprite
Given the fact the workaround is easy, I’d say, have a custom block spawn clones with a clone id, than sting the sprite to 0, there is a good workaround.
However, theres also a workaround to other blocks. And, while simple, th8is workaround is quite long.
However, again, the workaround is quite simple.
However, theres also a workaround to other blocks. And, while simple, th8is workaround is quite long.
However, again, the workaround is quite simple.
- qwerty_wasd_gone
-
1000+ posts
A c block for clones and for original sprite
-snip-what is that workaround?
- PsychicAura
-
100+ posts
A c block for clones and for original sprite
Sorry, no support. The workaround is pretty simple: Create a variable called “clone?” FOR THIS SPRITE ONLY. Make sure. Then:
when green flag clickedAnd if you want the code to specifically excecute for the original sprite only, then change the “1” to “0” in the boolean.
set [clone? v] to (0)
when I start as a clone
set [clone? v] to (1)
...
when I receive [message1 v]
if <(clone?) = (1)> then
...
Last edited by PsychicAura (Nov. 3, 2022 23:35:47)
- GIitchInTheMatrix
-
1000+ posts
A c block for clones and for original sprite
-snip-what is that workaround?
define Clone (#)
set [Clone? v] to [1] //this sprite only
repeat (# :: custom)
create clone of [ v]
end
Hat block :: hat
…
if <(Clone?) = [1]> then
Do stuff
end
- qwerty_wasd_gone
-
1000+ posts
A c block for clones and for original sprite
Sorry, no support. The workaround is pretty simple: Create a variable called “clone?” FOR THIS SPRITE ONLY. Make sure. Then:when green flag clickedAnd if you want the code to specifically excecute for the original sprite only, then change the “1” to “0” in the boolean.
set [clone? v] to (0)
when I start as a clone
set [clone? v] to (1)
...
when I receive [message1 v]
if <(clone?) = (1)> then
...
-snip-what is that workaround?define Clone (#)
set [Clone? v] to [1] //this sprite only
repeat (# :: custom)
create clone of [ v]
end
Hat block :: hat
…
if <(Clone?) = [1]> then
Do stuff
end
thank you for telling me
Last edited by qwerty_wasd_gone (Nov. 3, 2022 23:48:03)
- Gamer_Logan819
-
1000+ posts
A c block for clones and for original sprite
Sorry, no support. The workaround is pretty simple: Create a variable called “clone?” FOR THIS SPRITE ONLY. Make sure. Then:when green flag clickedAnd if you want the code to specifically excecute for the original sprite only, then change the “1” to “0” in the boolean.
set [clone? v] to (0)
when I start as a clone
set [clone? v] to (1)
...
when I receive [message1 v]
if <(clone?) = (1)> then
...
when green flag clicked
set [clone? v] to (0)
when I start as a clone
set [clone? v] to (1) //only identifies if clones exist, also would need multiple variables to do this in multiple sprites
...
when I receive [message1 v]
if <(clone?) = (1)> then //would not allow for original sprite and clones to run different scripts at same time
...
Full support due to other workarounds being too complicated.
- -ErrorPurpl_157
-
100+ posts
A c block for clones and for original sprite
Support, but it could be
<I am a clone? :: control>
// uses
when I receive [broadcast v]
if <I am a clone? :: control> then {
…
} :: control
- qwerty_wasd_gone
-
1000+ posts
A c block for clones and for original sprite
bump again (why is it so low?)
- 8bitrkt
-
500+ posts
A c block for clones and for original sprite
semi-support the work around is… simple enough, but i'm to lazy to make a variable for it. Although, I have a very obscure question:
drop down blocks can have stuff like this:
again this is a very obscure question
drop down blocks can have stuff like this:
broadcast (join () ())so what would this do?
run for (join () ()){
} :: control
again this is a very obscure question
- PPPDUD
-
1000+ posts
A c block for clones and for original sprite
very obscure question:Repeating things for <invalid input here> always runs the script 0 times by default. semi-support the work around is… simple enough, but i'm to lazy to make a variable for it. Although, I have a
drop down blocks can have stuff like this:broadcast (join () ())so what would this do?run for (join () ()){
} :: control
again this is a very obscure question
- qwerty_wasd_gone
-
1000+ posts
A c block for clones and for original sprite
very obscurethat's why it's a read-only dropdown semi-support the work around is… simple enough, but i'm to lazy to make a variable for it. Although, I have a
so what would this do?run for (join () ()){
} :: control
again this is a very obscure question
run for [clones only v]{}::controland not
run for (clones only v){}::controlread-only dropdowns don't allow reporter blocks
Last edited by qwerty_wasd_gone (Oct. 11, 2023 17:17:21)
- qwerty_wasd_gone
-
1000+ posts
A c block for clones and for original sprite
this is not a repeat blockRepeating things for <invalid input here> always runs the script 0 times by default. -snip-
Last edited by qwerty_wasd_gone (Nov. 9, 2022 02:00:01)
- qwerty_wasd_gone
-
1000+ posts
A c block for clones and for original sprite
-removed because old-
Last edited by qwerty_wasd_gone (Jan. 24, 2024 21:19:16)
- Discussion Forums
- » Suggestions
-
» A c block for clones and for original sprite