Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » why do dots on my graph wonder
- 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
foreverbecause there can be different amounts of dots, i am not creating 100 variables named y value
set y to (y value)
end
Last edited by sussybaga-123 (March 22, 2024 16:06:43)
- deck26
- Scratcher
1000+ posts
why do dots on my graph wonder
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 putIf 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 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 offoreverbecause there can be different amounts of dots, i am not creating 100 variables named y value
set y to (y value)
end
- MineTurte
- Scratcher
500+ posts
why do dots on my graph wonder
Or just make 1 Y variable that is set to “this sprite only” lol.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 putIf 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 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 offoreverbecause there can be different amounts of dots, i am not creating 100 variables named y value
set y to (y value)
end
she/her
Front-end web developer and software programmer
Javascript, HTML5, CSS, Python3, & Lua.
Signature color gradients here
cool LiDAR game!
AAGS Manager
- 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
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 asumptionsmy 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 putIf 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 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 offoreverbecause there can be different amounts of dots, i am not creating 100 variables named y value
set y to (y value)
end
- sussybaga-123
- Scratcher
30 posts
why do dots on my graph wonder
bro it uses clones. i dont think you know what hailstone numbers areOr just make 1 Y variable that is set to “this sprite only” lol.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 putIf 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 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 offoreverbecause there can be different amounts of dots, i am not creating 100 variables named y value
set y to (y value)
end
- deck26
- Scratcher
1000+ posts
why do dots on my graph wonder
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. 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 asumptionsthe 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 asumptionsmy 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 putIf 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 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 offoreverbecause there can be different amounts of dots, i am not creating 100 variables named y value
set y to (y value)
end
- 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
why didnt you just try the system to see what i was talking about.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. 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 asumptionsthe 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 asumptionsmy 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 putIf 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 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 offoreverbecause there can be different amounts of dots, i am not creating 100 variables named y value
set y to (y value)
end
- deck26
- Scratcher
1000+ posts
why do dots on my graph wonder
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 cloneThat is the stepper function. the index2 is which number is going to be plotted on the graph.
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
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.
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
my guy i said i wasnt able to put it all in 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
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 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
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
You mean 3x+1? If x is odd then 2x+1 willl be odd so they're constantly increasing. 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
gtg again, will continue after school, fr this time
- Discussion Forums
- » Help with Scripts
- » why do dots on my graph wonder