Discuss Scratch

kittiesrule247
Scratcher
100+ posts

"delete all clones" block

Sheep_maker wrote:

kittiesrule247 wrote:

CatsUnited wrote:

kittiesrule247 wrote:

that didn't work for me.
I imagine this would be because of a scripting issue, because that code does work. Is it possible for you to share this project just to see what's going on?
What project? And I tried it multiple times and nothing happened.
The project in which you're trying the workaround
I don’t have one right now because I deleted it and I did something else.
miniepicness
Scratcher
1000+ posts

"delete all clones" block

kittiesrule247 wrote:

Sheep_maker wrote:

kittiesrule247 wrote:

CatsUnited wrote:

kittiesrule247 wrote:

that didn't work for me.
I imagine this would be because of a scripting issue, because that code does work. Is it possible for you to share this project just to see what's going on?
What project? And I tried it multiple times and nothing happened.
The project in which you're trying the workaround
I don’t have one right now because I deleted it and I did something else.
Then share one using the script so we know what the problem is.

Last edited by miniepicness (Oct. 7, 2019 23:44:40)

Seth_Zaw
Scratcher
100+ posts

"delete all clones" block

kittiesrule247 wrote:

I think there should be a delete all clones block, because when i make games using clones, sometimes i just want to delete all the clones at once. Please add this, its needed!
delete all clones
Easily workaroundable.
delete this clone
Just don't put it in a
when green flag clicked
block or a
when I start as a clone
block.

Last edited by Seth_Zaw (Oct. 15, 2019 00:39:32)

8243874
Scratcher
100+ posts

"delete all clones" block

Here is a workaround:
when I start as a clone
repeat until <(delete clones) = [1]>
...
end
delete this clone
Nambaseking01
Scratcher
1000+ posts

"delete all clones" block

8243874 wrote:

Here is a workaround:
when I start as a clone
repeat until <(delete clones) = [1]>
...
end
delete this clone

Here you have it, but remember to set the variable to any number except 1 at the beginning and when you want the clones to be deleted set it to 1. Then all the clones will be automatically deleted using the script in the above post. Pretty simple workaround, really.
kittiesrule247
Scratcher
100+ posts

"delete all clones" block

i dont want it to repeat, I want it to also be able to delete itself without me setting delete clones to 1 because the clones are going to delete at different times and the remaining clones get deleted by that. And besides, this isn't for workarounds. This is a suggestion.
Sheep_maker
Scratcher
1000+ posts

"delete all clones" block

kittiesrule247 wrote:

i dont want it to repeat, I want it to also be able to delete itself without me setting delete clones to 1 because the clones are going to delete at different times and the remaining clones get deleted by that. And besides, this isn't for workarounds. This is a suggestion.
Workarounds are provided as an alternative solution because it is quite unlikely a suggestion will be implemented; they also are an argument against the claim that a suggestion is necessary.

Isn't the delete all clones supposed to delete the remaining clones? Also, the clones won't delete at different times unless there is a wait block in the repeat until loop, or you can instead use the wait until block in a separate script:
when I start as a clone
wait until <(delete clones) = [1]>
delete this clone
Goodthingsaregood66
Scratcher
100+ posts

"delete all clones" block

nXIII wrote:

OrcaCat wrote:

Also, I hate the glide block, because you can't have anything else going on while it's gliding.
…In the same thread.

broadcast
glide (2) secs to x: (20) y: (30)

when I receive (do stuff)
reset timer
repeat until {{timer} > (3)}
turn (3) degrees ccw
That, in block form.
broadcast [do stuff v]
glide (2) secs to x: (20) y: (30)

when I receive [do stuff v]
reset timer
repeat until <{{timer} > (3)}>
turn ccw (3) degrees

Last edited by Goodthingsaregood66 (July 21, 2020 21:17:57)

Paytronix
New Scratcher
60 posts

"delete all clones" block

There`s a workaround:
delete this clone

delete this clone
Priff
Scratcher
66 posts

"delete all clones" block

No support.
you can just do this:

repeat (300)
delete this clone
end

or just press the stop sign.
Maximouse
Scratcher
1000+ posts

"delete all clones" block

This might be useful, but the workaround shown by Kenny2scratch works and is very simple.
cooldude-222
Scratcher
100+ posts

"delete all clones" block

no support the workaround is so easy and simple
when green flag clicked
...
broadcast [delete all clones v]

When I receive [delete all clones v] // All clones with this code in there sprite will receive and run this code
delete this clone
PkmnQ
Scratcher
1000+ posts

"delete all clones" block

kenny2scratch wrote:

That was a very upsetting thread I just had to read through. Clones can receive broadcasts; if you do
when gf clicked
forever {
broadcast [clone v]
} :: control
when I receive [clone v]
create clone of [myself v]
the number of clones will multiply exponentially since each clone is receiving the broadcast and, for itself, making a clone of itself. So you'll have the parent, then the parent and a clone, then the parent and three clones, then the parent and seven clones… Until you hit the 300 clone limit. Clones do receive broadcasts, so
when I receive [delete clones v]
delete this clone
works.
My seven word response: But would a new scratcher know that?
Futurebot5
Scratcher
1000+ posts

"delete all clones" block

PkmnQ wrote:

kenny2scratch wrote:

That was a very upsetting thread I just had to read through. Clones can receive broadcasts; if you do
when gf clicked
forever {
broadcast [clone v]
} :: control
when I receive [clone v]
create clone of [myself v]
the number of clones will multiply exponentially since each clone is receiving the broadcast and, for itself, making a clone of itself. So you'll have the parent, then the parent and a clone, then the parent and three clones, then the parent and seven clones… Until you hit the 300 clone limit. Clones do receive broadcasts, so
when I receive [delete clones v]
delete this clone
works.
My seven word response: But would a new scratcher know that?
Yes. Also, please don't use “But would a new scratcher know that?” in your arguments, you were once one.
PkmnQ
Scratcher
1000+ posts

"delete all clones" block

Futurebot5 wrote:

Also, please don't use “But would a new scratcher know that?” in your arguments, you were once one.
Exactly. When I was a New Scratcher, I didn't know that clones received broadcasts.
the2000
Scratcher
1000+ posts

"delete all clones" block

On one hand the workaround is easy, but I agree that having to make a specific message for each sprite you need to do this for can be annoying. I don't see why we can't have this block, so I think it might as well be implemented.
TerrariaMods
Scratcher
100+ posts

"delete all clones" block

relrel wrote:

You must add a block which deletes all the clones of one sprite/all the clones.
Thanks!
Support, I could picture this being added, but for the time being you could use this:
define Delete All Clones
broadcast [Delete All Clones v] and wait

when I receive [Delete All Clones v]
delete this clone
—————————————————————-OR—————————————————————-

when green flag clicked
set [DeleteClones? v] to [No]

define Delete All Clones
set [DeleteClones? v] to [Yes]
wait (0.1) secs
set [DeleteClones? v] to [No]

when I start as a clone
wait until <(DeleteClones?) = [Yes]>
delete this clone
samq64
Scratcher
1000+ posts

"delete all clones" block

when I receive [Delete Clones v]
delete this clone
PotatoApocalypse727
Scratcher
43 posts

"delete all clones" block

when I receive [Delete all clones v] //Put this script in any sprite with clones
delete this clone

broadcast [Delete all clones v] and wait //Put this anywhere you want to delete all the clones (The broadcast and wait instead of just a normal broadcast makes sure that the clones are all deleted when the rest of the script runs)

Last edited by PotatoApocalypse727 (May 6, 2021 21:18:32)

sonic__fan
Scratcher
1000+ posts

"delete all clones" block

ah an 8 year old topic
bump

Powered by DjangoBB