I figured out how to make a 1 dimensional array, but I couldn't figure out how to read it. Then both a good and a bad thing happened. I stumbled upon this project. That is good because now I know how to write, but it's bad, because it was already done before. However, my version is more simplified. (As in you can only give new values, or erase the whole array.) During the development of it, I realized that scratch gives a limit on size. So I'm gonna be working around that with multiple arrays.
also, hadn't you recently posted a rotating 3-d image rendering program? I was telling you how to fix the pen flicker, when it suddenly said sorry invalid request.
ok now I am fully confused :) downloading did not help me understand lol! could you please explain in simple terms how it works? I think my brain died from script overload (^_^)
yeah I just did that, also in this project the upper limit is 10 digits (5 2-dig. numbers, 3 3-dig. numbers, etc.). But as soon as I fix the bug, the limit will skyrocket to 304 digits!
Here's a (simplified) example of how this uses the Mod and 10^ functions. Let's say you have an array 3458, and you want to break it up into the 2-digit numbers 34 and 58. To get the 58, you would use 3458 Mod (10^2). It uses 10^2 because you want 2 digits, and 10^2 is 100. Then subtract 58 from 3458 to get 3400, and divide 3400 by 100 to get 34. Now you have 34 and 58!
One variable is storing multiple digits through clever use of the Mod and 10^ functions. This has made the code really complicated; I can barely understand it, and I wrote it =P
This is a proof-of-concept demo of my infinite array system. The system doesn't work as well as I want it to; it only supports arrays up to 10-digits properly, while I want it to support up to 305 as intended, but it's still good for what it is. If you use arrays over 10 digits, the reading function and setting function won't work.
Comments
You need to be logged in to post comments
Add a Comment
you should use lists in scratch 1.3, is this made in v1.3? it doesn't show the 1.3 sign...
I figured out how to make a 1 dimensional array, but I couldn't figure out how to read it. Then both a good and a bad thing happened. I stumbled upon this project. That is good because now I know how to write, but it's bad, because it was already done before. However, my version is more simplified. (As in you can only give new values, or erase the whole array.) During the development of it, I realized that scratch gives a limit on size. So I'm gonna be working around that with multiple arrays.
Come to think of it, I could make a 3D array using their sizes....
Cool! I'm thinking of trying a 2D array based on the positions of hidden sprites...has anyone tried that yet?
my X-array is a square??? I know the side over eight means infinity bu a square?
also, hadn't you recently posted a rotating 3-d image rendering program? I was telling you how to fix the pen flicker, when it suddenly said sorry invalid request.
ok now I am fully confused :) downloading did not help me understand lol! could you please explain in simple terms how it works? I think my brain died from script overload (^_^)
yeah I just did that, also in this project the upper limit is 10 digits (5 2-dig. numbers, 3 3-dig. numbers, etc.). But as soon as I fix the bug, the limit will skyrocket to 304 digits!
(view all replies)also, are you using a variable to store or the screen? I have a basic pen-based array, here is a link: (link to project)">(link to project)
Here's a (simplified) example of how this uses the Mod and 10^ functions. Let's say you have an array 3458, and you want to break it up into the 2-digit numbers 34 and 58. To get the 58, you would use 3458 Mod (10^2). It uses 10^2 because you want 2 digits, and 10^2 is 100. Then subtract 58 from 3458 to get 3400, and divide 3400 by 100 to get 34. Now you have 34 and 58!
(view all replies)One variable is storing multiple digits through clever use of the Mod and 10^ functions. This has made the code really complicated; I can barely understand it, and I wrote it =P
(view all replies)I'm using the X_Array variable.
(view all replies)clever! please let me know when you are done, because I really need arrays for a project of mine.....