Discuss Scratch

Stillknox
Scratcher
3 posts

Clones wont delete

Hello, I'm making a flight combat simulator, and the enemy planes will delete themselves when they touch the edge. However, despite adding the “delete this clone” block, if you run the project long enough, the some clones still won't delete themselves. I've tried many different variations of code, but none of them work.
HighlaneGamingStudio
Scratcher
100+ posts

Clones wont delete

Please add a link to your project in the future.

So I take it this isn't working:
when I start as a clone
forever
if <touching (edge v) ?> then
delete this clone
end
end
Except for the touching edge boolean, everything else is control blocks!

I'm not sure what to tell you to do if that's not working. If you aren't using that, use that exact code to see if it works.
jmb1293634
Scratcher
100+ posts

Clones wont delete

another possible solution I use a lot
when I start as a clone
repeat until <touching [edge v] ?>
...
end
delete this clone
Stillknox
Scratcher
3 posts

Clones wont delete

HighlaneGamingStudio wrote:

Please add a link to your project in the future.

So I take it this isn't working:
when I start as a clone
forever
if <touching (edge v) ?> then
delete this clone
end
end
Except for the touching edge boolean, everything else is control blocks!

I'm not sure what to tell you to do if that's not working. If you aren't using that, use that exact code to see if it works.

sorry, here's the link:https://scratch-mit-edu.ezproxyberklee.flo.org/projects/1137480870/
Stillknox
Scratcher
3 posts

Clones wont delete

jmb1293634 wrote:

another possible solution I use a lot
when I start as a clone
repeat until <touching [edge v] ?>
...
end
delete this clone
I tried a mechanism that is similar to yours and it still doesen't work. here's the link: https://scratch-mit-edu.ezproxyberklee.flo.org/projects/1137480870/
jmb1293634
Scratcher
100+ posts

Clones wont delete

Stillknox wrote:

jmb1293634 wrote:

another possible solution I use a lot
when I start as a clone
repeat until <touching [edge v] ?>
...
end
delete this clone
I tried a mechanism that is similar to yours and it still doesen't work. here's the link: https://scratch-mit-edu.ezproxyberklee.flo.org/projects/1137480870/
It seems to work for me

Powered by DjangoBB