Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Clone Glitch
- Creater-Dude9
- Scratcher
71 posts
Clone Glitch
So i made 4 buttons in the same sprite using clones and they all work except the setting one even though they have the same exact code, this is the code i used:
This worked for all my other games that i used clone id in but for some reason not this one and it is just one button, hope you can help and thank you
when I receive [Settingsv]
if <(Clone ID) = [1]> then
delete this clone
end
if <(Clone ID) = [2]> then
delete this clone
end
if <(Clone ID) = [3]> then
delete this clone
end
if <Clone ID) = [4]> then
delete this clone
end
This worked for all my other games that i used clone id in but for some reason not this one and it is just one button, hope you can help and thank you
- Cool_Dude2022
- Scratcher
100+ posts
Clone Glitch
So i made 4 buttons in the same sprite using clones and they all work except the setting one even though they have the same exact code, this is the code i used:when I receive [Settingsv]
if <(Clone ID) = [1]> then
delete this clone
end
if <(Clone ID) = [2]> then
delete this clone
end
if <(Clone ID) = [3]> then
delete this clone
end
if <Clone ID) = [4]> then
delete this clone
end
This worked for all my other games that i used clone id in but for some reason not this one and it is just one button, hope you can help and thank you
Can you share the game? I can't help you if I don't know if you're correctly changing the variable or if anything else is wrong.
Did I help you fix your problem? If so, please nominate my project to be featured!
If my code is used, credit is NOT required
- Creater-Dude9
- Scratcher
71 posts
Clone Glitch
No i cant share the project but do you have bl*cklive?So i made 4 buttons in the same sprite using clones and they all work except the setting one even though they have the same exact code, this is the code i used:when I receive [Settingsv]
if <(Clone ID) = [1]> then
delete this clone
end
if <(Clone ID) = [2]> then
delete this clone
end
if <(Clone ID) = [3]> then
delete this clone
end
if <Clone ID) = [4]> then
delete this clone
end
This worked for all my other games that i used clone id in but for some reason not this one and it is just one button, hope you can help and thank you
Can you share the game? I can't help you if I don't know if you're correctly changing the variable or if anything else is wrong.
- Creater-Dude9
- Scratcher
71 posts
Clone Glitch
And if you dont know what bl*cklive is visit: https://www.youtube.com/watch?v=HpkCLIvxZgI&list=LL&index=3
- Cool_Dude2022
- Scratcher
100+ posts
Clone Glitch
https://www.youtube.com/watch?v=HpkCLIvxZgI&list=LL&index=3And if you dont know what bl*cklive is visit:
Yes, I know what BLOCKlive is. I meant to make it public and share the link so that I can see it.
Did I help you fix your problem? If so, please nominate my project to be featured!
If my code is used, credit is NOT required
- Creater-Dude9
- Scratcher
71 posts
Clone Glitch
Cool_Dude2022 wrote:
Yes, I know what BLOCKlive is. I meant to make it public and share the link so that I can see it.
Do you want me to send the project using BLOCKlive
Yes, I know what BLOCKlive is. I meant to make it public and share the link so that I can see it.
Do you want me to send the project using BLOCKlive
Last edited by Creater-Dude9 (March 28, 2024 13:51:55)
- Cool_Dude2022
- Scratcher
100+ posts
Clone Glitch
Cool_Dude2022 wrote:
Yes, I know what BLOCKlive is. I meant to make it public and share the link so that I can see it.
Do you want me to send the project using BLOCKlive
No, I want you to send the project through here. Press the share button and then give the link.
Did I help you fix your problem? If so, please nominate my project to be featured!
If my code is used, credit is NOT required
- deck26
- Scratcher
1000+ posts
Clone Glitch
If you just want to keep some part of the project hidden create a copy and delete the things you want to keep secret and share the copy. It's much easier to help if we can see the project.
- Creater-Dude9
- Scratcher
71 posts
Clone Glitch
Ok here it is: If you just want to keep some part of the project hidden create a copy and delete the things you want to keep secret and share the copy. It's much easier to help if we can see the project.https://scratch.mit.edu/projects/991565040/ (I shared it on my alt account)
- MrKingofScratch
- Scratcher
100+ posts
Clone Glitch
simple: you don't have any script that receives from the message kill clones. Just copy the code from the settings script but for kill clones:
Tip: you can condense this code with the following:
but use the green contains block instead of the orange one (the green one hasn't been added to forums yet)
when I receive [kill clones v]
if <(cloneid) = [1]> then
delete this clone
end
if <(cloneid) = [2]> then
delete this clone
end
if <(cloneid) = [3]> then
delete this clone
end
if <(cloneid) = [4]> then
delete this clone
end
Tip: you can condense this code with the following:
if <[1,2,3,4,] contains (join (cloneid) [,]) ?> then
delete this clone
end
but use the green contains block instead of the orange one (the green one hasn't been added to forums yet)
- deck26
- Scratcher
1000+ posts
Clone Glitch
So when you broadcast Settings you create 4 new clones but also delete the clones with the relevant ID. Why? You don't control the order in which those scripts run so you could have each of the clones creating 4 more clones before running the second script and deleting themselves - the new clones didn't exist when the broasdcast was made so will be left alone.
- Creater-Dude9
- Scratcher
71 posts
Clone Glitch
So when you broadcast Settings you create 4 new clones but also delete the clones with the relevant ID. Why? You don't control the order in which those scripts run so you could have each of the clones creating 4 more clones before running the second script and deleting themselves - the new clones didn't exist when the broasdcast was made so will be left alone.
Oh thank you do you want me to give you credit in the description?
- Discussion Forums
- » Help with Scripts
- » Clone Glitch