Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » No-Clone Deleting
- KritzkriegKane
-
Scratcher
4 posts
No-Clone Deleting
HI all
How am I supposed to make a script which makes things delete themselves (and stop their script temporarily) and make them work/appear again
How am I supposed to make a script which makes things delete themselves (and stop their script temporarily) and make them work/appear again
- scubajerry
-
Scratcher
1000+ posts
No-Clone Deleting
A lot has to do with who is deciding to delete the clones. If it is something other than the clone, when you create the clone, you should have a variable that contains the “number” of the clone are creating. The clone should store ITS number away in a FOT THIS SPRITE ONLY variable.
In some sprite or stage
In clone
In some sprite or stage
set [Clone to delete v] to [8 ]
broadcast [delete clone v]
In clone
when I receive [ delete clone v]
if <(Clone to Delete) = (My Clone ID) > then
delete this clone
end
Last edited by scubajerry (April 26, 2016 16:13:20)
- Mole_Gaming
-
Scratcher
100+ posts
No-Clone Deleting
you could use the
hideblock to make them disappear, then use the
showblock to show them
- MellerReal
-
Scratcher
88 posts
No-Clone Deleting
I use it like this:
That's how I use for this: https://scratch.mit.edu/projects/105987186/
Share your project and it'll be a bit easier to help.
when green flag clicked
forever
create clone of [myself v]
wait (2) secs
end
when I start as a clone
show
glide (5) secs to x: (0) y: (0)
wait (5) secs
hide
delete this clone
That's how I use for this: https://scratch.mit.edu/projects/105987186/
Share your project and it'll be a bit easier to help.
Last edited by MellerReal (April 26, 2016 18:10:29)
- deck26
-
Scratcher
1000+ posts
No-Clone Deleting
I use it like this:No point hiding the clone if you're deleting it with the next block though.when green flag clicked
forever
create clone of [myself v]
wait (2) secs
end
when I start as a clone
show
glide (5) secs to x: (0) y: (0)
wait (5) secs
hide
delete this clone
That's how I use for this: https://scratch.mit.edu/projects/105987186/
Share your project and it'll be a bit easier to help.
- KritzkriegKane
-
Scratcher
4 posts
No-Clone Deleting
you could use thehideblock to make them disappear, then use theshowblock to show them
For some reason the script is still working even tho the thing is gone…
- deck26
-
Scratcher
1000+ posts
No-Clone Deleting
Scripts will still run for hidden sprites but not for deleted clones. Use a variable if necessary to keep track of whether a sprite is visible and only run the loops in the scripts when the variable has the value indicating it is showing.you could use thehideblock to make them disappear, then use theshowblock to show them
For some reason the script is still working even tho the thing is gone…
- 0xF3d04a
-
Scratcher
54 posts
No-Clone Deleting
I don't believe you can get scripts to stop, but you can get them to pause.
wait until <>
- deck26
-
Scratcher
1000+ posts
No-Clone Deleting
I don't believe you can get scripts to stop, but you can get them to pause.wait until <>
stop [this script v]
stop [other scripts in sprite v]
- Discussion Forums
- » Help with Scripts
-
» No-Clone Deleting