Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Clones wont delete
- Stillknox
-
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
-
100+ posts
Clones wont delete
Please add a link to your project in the future.
So I take it this isn't working:
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.
So I take it this isn't working:
when I start as a cloneExcept for the touching edge boolean, everything else is control blocks!
forever
if <touching (edge v) ?> then
delete this clone
end
end
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
-
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
-
3 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 cloneExcept for the touching edge boolean, everything else is control blocks!
forever
if <touching (edge v) ?> then
delete this clone
end
end
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
-
3 posts
Clones wont delete
I tried a mechanism that is similar to yours and it still doesen't work. here's the link: another possible solution I use a lothttps://scratch-mit-edu.ezproxyberklee.flo.org/projects/1137480870/when I start as a clone
repeat until <touching [edge v] ?>
...
end
delete this clone
- jmb1293634
-
100+ posts
Clones wont delete
It seems to work for meI tried a mechanism that is similar to yours and it still doesen't work. here's the link: another possible solution I use a lothttps://scratch-mit-edu.ezproxyberklee.flo.org/projects/1137480870/when I start as a clone
repeat until <touching [edge v] ?>
...
end
delete this clone
- Discussion Forums
- » Help with Scripts
-
» Clones wont delete