Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Weird Cloning Issues...
- 3XAY
- Scratcher
28 posts
Weird Cloning Issues...
Hi. I have a project called cash clicker. I am making a highscore section just like my stats section but for some reason when I clone the sprite, it switches back to the highscore icon, even though I coded it to NOT do that. Here is the link. (Go to the highscore sprite and join the events together to the closest stack of orphaned blocks.) Also look at stats sprite to see what I did before. Thank you.
Last edited by 3XAY (May 30, 2021 21:31:07)
- -Kryptonite-
- Scratcher
1000+ posts
Weird Cloning Issues...
Should be fixed now! You forgot to provide the link…
I'll check tomorrow and see, the code's a lot, and I don't have time right now, goin to sleep XD, but yeah I think you could have it that its boradcasting at the wrong time or something. SInce the icon shows up when there is a broadcast, that could be why. You arent broadcasting the close highscore, OR the hitboxes overlap.
Welcome to my Forum signature.
- 3XAY
- Scratcher
28 posts
Weird Cloning Issues...
There aren't any hit boxes. Plus there is a forever loop that runs making sure the costume switches back to the correct one. And there is a variable that deals with “broadcasting the close highscore”.Should be fixed now! You forgot to provide the link…
I'll check tomorrow and see, the code's a lot, and I don't have time right now, goin to sleep XD, but yeah I think you could have it that its boradcasting at the wrong time or something. SInce the icon shows up when there is a broadcast, that could be why. You arent broadcasting the close highscore, OR the hitboxes overlap.
- 1010101O1jr
- Scratcher
27 posts
Weird Cloning Issues...
You probably forgot to when I start as a clone switch costume to stats
- RobotChickens
- Scratcher
500+ posts
Weird Cloning Issues...
I found the problem. Under the “High score sprite”
I suggest changing all these scripts:
To these:
And add broadcasters for these messages in the “Low Detail” sprite to prevent this problem.
Or, remove the Low Detail option altogether because this project doesn't seem big enough to need it…
Hope this helps!
when I receive [tick v]This script is running so fast that the sprite is constantly changing to the “High score” trophy costume. So when it makes a clone and it tries to switch to the correct costume it can't because its changing to the “High score” costume.
if <(Low Quality) = [1]> then
switch costume to [High score v]
else
switch costume to [High score_low v]
end
I suggest changing all these scripts:
if <(Low Quality) = [1]> then
switch costume to [... v]
else
switch costume to [..._low v]
end
To these:
when I receive [LQ v]
switch costume to [... v]
when I receive [HQ v]
switch costume to [..._low v]
And add broadcasters for these messages in the “Low Detail” sprite to prevent this problem.
Or, remove the Low Detail option altogether because this project doesn't seem big enough to need it…
Hope this helps!
I will be refraining from active and frequent participation in forum discourse
until the Gen-Alpha Linguistic Epidemic* subsides into eradication,
if or when such an event will occur in the near future.
(Let me know when it's safe to come out. I'll be lurking in the ATs.)
✊ Support the suggestion HERE by adding this button to your signature ✊
until the Gen-Alpha Linguistic Epidemic* subsides into eradication,
if or when such an event will occur in the near future.
(Let me know when it's safe to come out. I'll be lurking in the ATs.)
✊ Support the suggestion HERE by adding this button to your signature ✊
[url=scratch.mit.edu/discuss/topic/557083/][img]u.cubeupload.com/RBC/FmjBtn.gif[/img][/url]
*brainrot
- 3XAY
- Scratcher
28 posts
Weird Cloning Issues...
But if you look at my stats sprite, I did the EXACT same thing but it works… I found the problem. Under the “High score sprite”when I receive [tick v]This script is running so fast that the sprite is constantly changing to the “High score” trophy costume. So when it makes a clone and it tries to switch to the correct costume it can't because its changing to the “High score” costume.
if <(Low Quality) = [1]> then
switch costume to [High score v]
else
switch costume to [High score_low v]
end
I suggest changing all these scripts:if <(Low Quality) = [1]> then
switch costume to [... v]
else
switch costume to [..._low v]
end
To these:when I receive [LQ v]
switch costume to [... v]
when I receive [HQ v]
switch costume to [..._low v]
And add broadcasters for these messages in the “Low Detail” sprite to prevent this problem.
Or, remove the Low Detail option altogether because this project doesn't seem big enough to need it…
Hope this helps!
- Discussion Forums
- » Help with Scripts
- » Weird Cloning Issues...