Discuss Scratch

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)


Hey, check out my website, I coded everything myself!

The_Imaginarium
Scratcher
1000+ posts

Weird Cloning Issues...

You forgot to provide the link…
3XAY
Scratcher
28 posts

Weird Cloning Issues...

The_Imaginarium wrote:

You forgot to provide the link…
Should be fixed now!

Hey, check out my website, I coded everything myself!

-Kryptonite-
Scratcher
1000+ posts

Weird Cloning Issues...

3XAY wrote:

The_Imaginarium wrote:

You forgot to provide the link…
Should be fixed now!

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...

-Kryptonite- wrote:

3XAY wrote:

The_Imaginarium wrote:

You forgot to provide the link…
Should be fixed now!

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.
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”.

Hey, check out my website, I coded everything myself!

1010101O1jr
Scratcher
27 posts

Weird Cloning Issues...

You probably forgot to when I start as a clone switch costume to stats
3XAY
Scratcher
28 posts

Weird Cloning Issues...

1010101O1jr wrote:

You probably forgot to when I start as a clone switch costume to stats
nope, I did that! (Check inside my project). Plus the problem is with the HIGHSCORE.

Hey, check out my website, I coded everything myself!

RobotChickens
Scratcher
500+ posts

Weird Cloning Issues...

I found the problem. Under the “High score sprite”
when I receive [tick v]
if <(Low Quality) = [1]> then
switch costume to [High score v]
else
switch costume to [High score_low v]
end
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.

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

[url=scratch.mit.edu/discuss/topic/557083/][img]u.cubeupload.com/RBC/FmjBtn.gif[/img][/url]


[SIGNATURE UNDER CONSTRUCTION]








*brainrot
3XAY
Scratcher
28 posts

Weird Cloning Issues...

RobotChickens wrote:

I found the problem. Under the “High score sprite”
when I receive [tick v]
if <(Low Quality) = [1]> then
switch costume to [High score v]
else
switch costume to [High score_low v]
end
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.

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!
But if you look at my stats sprite, I did the EXACT same thing but it works…

Hey, check out my website, I coded everything myself!

Powered by DjangoBB