Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » clones wont spawn
- freddyfearful
-
22 posts
clones wont spawn
basically I have (similar to) this code:
the problem is that the clones don't delete fast enough so they hit the cap of 300 clones with there being less than 260 in the next frame, BUT if I add a wait 0 seconds than every clone disapears for a frame which looks ugly for what I'm trying to do
Please help
when I receive [something]
if <> then
else
delete this clone
end
code that makes around 260 clones
the problem is that the clones don't delete fast enough so they hit the cap of 300 clones with there being less than 260 in the next frame, BUT if I add a wait 0 seconds than every clone disapears for a frame which looks ugly for what I'm trying to do
Please help
Last edited by freddyfearful (Feb. 7, 2022 02:59:48)
- CringeyCracker
-
34 posts
clones wont spawn
instead of the
when I receive [something v]use
when I start as a clone
when I receive [Follower]
say [Yay!]
broadcast [Celebrate!]
- freddyfearful
-
22 posts
clones wont spawn
I'm not that dumb D:
the problem is that the
the problem is that the
code that makes around 260 clonesDOESN'T make 260 clones because of the previous 260 clones that can't seem to be deleted fast enough, but if I wait for them to delete it makes it look ugly
Last edited by freddyfearful (Feb. 7, 2022 03:16:29)
- CringeyCracker
-
34 posts
clones wont spawn
oh then try a block without refresh
define something
if <> then
else
delete this clone
end
broadcast [make clones v]
Last edited by CringeyCracker (Feb. 7, 2022 03:18:31)
when I receive [Follower]
say [Yay!]
broadcast [Celebrate!]
- freddyfearful
-
22 posts
clones wont spawn
.
Last edited by freddyfearful (Feb. 7, 2022 04:02:20)
- freddyfearful
-
22 posts
clones wont spawn
doesn't work, it had no refresh in the first place oh then try a block without refreshdefine something
if <> then
else
delete this clone
end
broadcast [make clones v]
- freddyfearful
-
22 posts
clones wont spawn
I solved it! ;D
when I receive [delete]
broadcast [something that create clones]
delete this clone
when I receive [something that create clones]
create hundreds of clone babies
Last edited by freddyfearful (Feb. 7, 2022 04:54:22)
- deck26
-
1000+ posts
clones wont spawn
Even better, just do this
Only the sprite will get past the if block since it can't delete itself.
when I receive [ v]
if <(1) = (1)> then
delete this clone
end
code to do the rest and create new clones
Only the sprite will get past the if block since it can't delete itself.
- freddyfearful
-
22 posts
clones wont spawn
actually I put a stop this script code in the if for if the clone shouldn't get deleted Even better, just do thiswhen I receive [ v]
if <(1) = (1)> then
delete this clone
end
code to do the rest and create new clones
Only the sprite will get past the if block since it can't delete itself.
if <(something) = (1)>
stop [this script]
else
delete this clone
end
Last edited by freddyfearful (Feb. 7, 2022 16:28:56)
- freddyfearful
-
22 posts
clones wont spawn
KGSJIJFIASIOJ why does no one care to figure out or test what they're gonna post? the WHOLE problem was that THAT (above) doesn't work JIO:AJOFSOI (the reason why it didn't work (if you read u woulda known this) is because the clones stay just long enough to stay and keep the clone limit up preventing new ones spawning) Even better, just do thiswhen I receive [ v]
if <(1) = (1)> then
delete this clone
end
code to do the rest and create new clones
Only the sprite will get past the if block since it can't delete itself.
Last edited by freddyfearful (Feb. 7, 2022 16:52:33)
- deck26
-
1000+ posts
clones wont spawn
So add a wait 0 secs before the code you want to run so all the clones have run the receiver and been deleted before the new ones are created.KGSJIJFIASIOJ why does no one care to figure out or test what they're gonna post? the WHOLE problem was that THAT (above) doesn't work JIO:AJOFSOI (the reason why it didn't work (if you read u woulda known this) is because the clones stay just long enough to stay and keep the clone limit up preventing new ones spawning) Even better, just do thiswhen I receive [ v]
if <(1) = (1)> then
delete this clone
end
code to do the rest and create new clones
Only the sprite will get past the if block since it can't delete itself.
- Discussion Forums
- » Help with Scripts
-
» clones wont spawn