Discuss Scratch

sussybaga-123
Scratcher
30 posts

why do dots on my graph wonder

the dots on my graph shouldnt have any way of changing their y axis after doing it the first time but they do it anyways. the dots are coded in sprite 4 of my project. Also if anyone has ideas on how to shrink the code at all i would love to hear it bc there are massive chunks of code. Posting this again because the only reply sent the exact opposite of what i wanted. I cannot just put
forever
set y to (y value)
end
because there can be different amounts of dots, i am not creating 100 variables named y value

Last edited by sussybaga-123 (March 22, 2024 16:06:43)

deck26
Scratcher
1000+ posts

why do dots on my graph wonder

sussybaga-123 wrote:

the dots on my graph shouldnt have any way of changing their y axis after doing it the first time but they do it anyways. the dots are coded in sprite 4 of my project. Also if anyone has ideas on how to shrink the code at all i would love to hear it bc there are massive chunks of code. Posting this again because the only reply sent the exact opposite of what i wanted. I cannot just put
forever
set y to (y value)
end
because there can be different amounts of dots, i am not creating 100 variables named y value
If you use a list each hailstone just needs to access its own item in the list. Just give each clone a unique number and it can access that list item. I can't make sense of how to see the problem.

MineTurte
Scratcher
500+ posts

why do dots on my graph wonder

deck26 wrote:

sussybaga-123 wrote:

the dots on my graph shouldnt have any way of changing their y axis after doing it the first time but they do it anyways. the dots are coded in sprite 4 of my project. Also if anyone has ideas on how to shrink the code at all i would love to hear it bc there are massive chunks of code. Posting this again because the only reply sent the exact opposite of what i wanted. I cannot just put
forever
set y to (y value)
end
because there can be different amounts of dots, i am not creating 100 variables named y value
If you use a list each hailstone just needs to access its own item in the list. Just give each clone a unique number and it can access that list item. I can't make sense of how to see the problem.

Or just make 1 Y variable that is set to “this sprite only” lol.

(pronouns are she/her). Advanced Alpha Game Studios Manager; website: https://aags2.w3spaces.com
This is JuniperActias. AKA Moth mommy. If I helped you out consider following Juni-Bug (my new account)!




If you found this secret, say uwu
Signature gradients here













sussybaga-123
Scratcher
30 posts

why do dots on my graph wonder

the system uses a steping function, where after each dot is placed it will look for the next number in the hailstone number list and put a point there on the graph. please just look at the code instead of just making asumptions

deck26 wrote:

sussybaga-123 wrote:

the dots on my graph shouldnt have any way of changing their y axis after doing it the first time but they do it anyways. the dots are coded in sprite 4 of my project. Also if anyone has ideas on how to shrink the code at all i would love to hear it bc there are massive chunks of code. Posting this again because the only reply sent the exact opposite of what i wanted. I cannot just put
forever
set y to (y value)
end
because there can be different amounts of dots, i am not creating 100 variables named y value
If you use a list each hailstone just needs to access its own item in the list. Just give each clone a unique number and it can access that list item. I can't make sense of how to see the problem.

the system uses a steping function, where after each dot is placed it will look for the next number in the hailstone number list and put a point there on the graph. please just look at the code instead of just making asumptions
sussybaga-123
Scratcher
30 posts

why do dots on my graph wonder

MineTurte wrote:

deck26 wrote:

sussybaga-123 wrote:

the dots on my graph shouldnt have any way of changing their y axis after doing it the first time but they do it anyways. the dots are coded in sprite 4 of my project. Also if anyone has ideas on how to shrink the code at all i would love to hear it bc there are massive chunks of code. Posting this again because the only reply sent the exact opposite of what i wanted. I cannot just put
forever
set y to (y value)
end
because there can be different amounts of dots, i am not creating 100 variables named y value
If you use a list each hailstone just needs to access its own item in the list. Just give each clone a unique number and it can access that list item. I can't make sense of how to see the problem.

Or just make 1 Y variable that is set to “this sprite only” lol.
bro it uses clones. i dont think you know what hailstone numbers are
deck26
Scratcher
1000+ posts

why do dots on my graph wonder

sussybaga-123 wrote:

the system uses a steping function, where after each dot is placed it will look for the next number in the hailstone number list and put a point there on the graph. please just look at the code instead of just making asumptions

deck26 wrote:

sussybaga-123 wrote:

the dots on my graph shouldnt have any way of changing their y axis after doing it the first time but they do it anyways. the dots are coded in sprite 4 of my project. Also if anyone has ideas on how to shrink the code at all i would love to hear it bc there are massive chunks of code. Posting this again because the only reply sent the exact opposite of what i wanted. I cannot just put
forever
set y to (y value)
end
because there can be different amounts of dots, i am not creating 100 variables named y value
If you use a list each hailstone just needs to access its own item in the list. Just give each clone a unique number and it can access that list item. I can't make sense of how to see the problem.

the system uses a steping function, where after each dot is placed it will look for the next number in the hailstone number list and put a point there on the graph. please just look at the code instead of just making asumptions
Not sure who that's addressed to but I did try to look at your code but couldn't make sense of the project more generally. If we can't replicate the issue it makes it harder to help so it is up to you to help us to help you.
sussybaga-123
Scratcher
30 posts

why do dots on my graph wonder

you know what, i have about 20 minutes. hopefully i can write all the code in that time
sussybaga-123
Scratcher
30 posts

why do dots on my graph wonder

deck26 wrote:

sussybaga-123 wrote:

the system uses a steping function, where after each dot is placed it will look for the next number in the hailstone number list and put a point there on the graph. please just look at the code instead of just making asumptions

deck26 wrote:

sussybaga-123 wrote:

the dots on my graph shouldnt have any way of changing their y axis after doing it the first time but they do it anyways. the dots are coded in sprite 4 of my project. Also if anyone has ideas on how to shrink the code at all i would love to hear it bc there are massive chunks of code. Posting this again because the only reply sent the exact opposite of what i wanted. I cannot just put
forever
set y to (y value)
end
because there can be different amounts of dots, i am not creating 100 variables named y value
If you use a list each hailstone just needs to access its own item in the list. Just give each clone a unique number and it can access that list item. I can't make sense of how to see the problem.

the system uses a steping function, where after each dot is placed it will look for the next number in the hailstone number list and put a point there on the graph. please just look at the code instead of just making asumptions
Not sure who that's addressed to but I did try to look at your code but couldn't make sense of the project more generally. If we can't replicate the issue it makes it harder to help so it is up to you to help us to help you.
why didnt you just try the system to see what i was talking about.
deck26
Scratcher
1000+ posts

why do dots on my graph wonder

sussybaga-123 wrote:

why didnt you just try the system to see what i was talking about.

I tried but couldn't understand how to get it to do anything!
sussybaga-123
Scratcher
30 posts

why do dots on my graph wonder

when I start as a clone
if <<[index2] = (length of [ hailstone numbers] :: list)> or <[index2] > (length of [ hailstone numbers] :: list)> then
set [ index2] to [1]
else
change [ index2] by (1)
end
That is the stepper function. the index2 is which number is going to be plotted on the graph.
gtg bc my study hall is about to end but i'll finish explaneing after school
deck26
Scratcher
1000+ posts

why do dots on my graph wonder

You need to think of this from the point of view of someone who knows nothing about the project. Providing vague info just slows down any help you're going to get or even puts helpers off.

Is index2 a number being plotted on a graph or an index value to list items? Where does index2 get plotted - you need an x and y position to plot a graph point.

Describe how to run the project and create a graph and what happens compares with what you want/expect to happen please.
sussybaga-123
Scratcher
30 posts

why do dots on my graph wonder

deck26 wrote:

You need to think of this from the point of view of someone who knows nothing about the project. Providing vague info just slows down any help you're going to get or even puts helpers off.

Is index2 a number being plotted on a graph or an index value to list items? Where does index2 get plotted - you need an x and y position to plot a graph point.

Describe how to run the project and create a graph and what happens compares with what you want/expect to happen please.
my guy i said i wasnt able to put it all in
sussybaga-123
Scratcher
30 posts

why do dots on my graph wonder

deck26 wrote:

You need to think of this from the point of view of someone who knows nothing about the project. Providing vague info just slows down any help you're going to get or even puts helpers off.

Is index2 a number being plotted on a graph or an index value to list items? Where does index2 get plotted - you need an x and y position to plot a graph point.

Describe how to run the project and create a graph and what happens compares with what you want/expect to happen please.
think of index2 as a cursor of sorts for the hailstone numbers. it just chooses which number in the list hailstone numbers it is going to try and plot next
sussybaga-123
Scratcher
30 posts

why do dots on my graph wonder

you know it would probably be helpful to explane what hailstone numbers are. Also known as the 2x+1 problem, hailstone numbers are determened as follows. if the number is odd you double the number and add one. if its even you divide it by two. you continue to do this to re result of whatever you did untill you reach 1. the problem arises that there could be more than one loop (the 4,2,1 loop) but nobody knows.
sussybaga-123
Scratcher
30 posts

why do dots on my graph wonder

set y to ((item ( index2) of [hailstone numbers] :: list) - ((180) - (item ( index2) of [hailstone numbers] :: list)))
this scales down the number, as some hailstone numbers can balloon to massive numbers very quickly, and sets it to the y value.

Last edited by sussybaga-123 (March 26, 2024 16:23:16)

deck26
Scratcher
1000+ posts

why do dots on my graph wonder

sussybaga-123 wrote:

you know it would probably be helpful to explane what hailstone numbers are. Also known as the 2x+1 problem, hailstone numbers are determened as follows. if the number is odd you double the number and add one. if its even you divide it by two. you continue to do this to re result of whatever you did untill you reach 1. the problem arises that there could be more than one loop (the 4,2,1 loop) but nobody knows.
You mean 3x+1? If x is odd then 2x+1 willl be odd so they're constantly increasing.

sussybaga-123
Scratcher
30 posts

why do dots on my graph wonder

gtg again, will continue after school, fr this time

Powered by DjangoBB