Computer Science Canada Help : Drawing balls using arrays |
| Author: | MrBleeple [ Thu Apr 24, 2014 7:18 pm ] | ||
| Post subject: | Help : Drawing balls using arrays | ||
What is it you are trying to achieve? I am trying to ask the user for how many balls they would like to draw. The ball colours and starting positions will be randomized, and I want the x and y co-ordinates to increase using an array. When it hits the border, they will be bounce off. What is the problem you are having? I have no idea how to array, so I am having troubles trying to draw a specific amount of balls. Describe what you have tried to solve this problem Tried to learn arrays, read multiple tutorials, didn't help. Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
Please specify what version of Turing you are using 4.1.1 I haven't added the collision system etc. I will do that after, just need to focus on getting the balls to work. |
|||
| Author: | Raknarg [ Thu Apr 24, 2014 8:00 pm ] |
| Post subject: | RE:Help : Drawing balls using arrays |
Do you know how to do this using only one ball? Each ball has its own x and y coordinates. An array is just a collection of variables. If you have an array of length 5, think about it in the same way you would 5 different variables. |
|