Computer Science Canada Falling From Sky |
Author: | eNc [ Thu Jan 20, 2005 4:21 pm ] | ||
Post subject: | Falling From Sky | ||
How would I go about having multiple ovals "falling" from the "sky" at the same time but at different speeds
|
Author: | Cervantes [ Thu Jan 20, 2005 4:28 pm ] |
Post subject: | |
I've told you many times before, in your other thread, to use an array. Do you know how to use an array? If so, the answer should be pretty simple. If not, learn! EDIT: Posted some code, eh? That looks like the code from your last post. In fact, it's identical. It would seem as though you have the exact same question as before. Instead of spamming the boards with the same question, ask it once. If you need clarification, ask again, more specifically, in the same thread. Spamming the boards only causes people to be annoyed with you; you might not get any help as a result. And, of course, you'll lose bits. |
Author: | eNc [ Thu Jan 20, 2005 4:45 pm ] |
Post subject: | |
Cervantes wrote: I've told you many times before, in your other thread, to use an array. Do you know how to use an array? If so, the answer should be pretty simple. If not, learn!
EDIT: Posted some code, eh? That looks like the code from your last post. In fact, it's identical. It would seem as though you have the exact same question as before. Instead of spamming the boards with the same question, ask it once. If you need clarification, ask again, more specifically, in the same thread. Spamming the boards only causes people to be annoyed with you; you might not get any help as a result. And, of course, you'll lose bits. yea sorry i meant to post my code with loops. and yes i know how to use an array but i have no clue how that would help me |
Author: | person [ Thu Jan 20, 2005 5:51 pm ] |
Post subject: | |
this is how u use arrays!! var num : array 1 .. 3 of int var num1 : array 1 .. 3 of int process doval loop for j : 1 .. 3 num1 (j) := 400 end for for j : 1 .. 3 num1 (j) := num1 (j) - Rand.Int (1, 50) end for for i : 1 .. 3 drawfilloval (num (i), num1 (i), 5, 5, blue) delay (100) drawfilloval (num (i), num1 (i), 6, 6, white) end for exit when num1 (1) < 0 or num1 (2) < 0 or num1 (3) < 0 end loop end doval for i : 1 .. 4 loop y := 400 for a : 1 .. 3 num (a) := Rand.Int (1, 300) end for fork doval delay (1000) end loop end for |
Author: | basketball4ever [ Thu Jan 20, 2005 5:55 pm ] |
Post subject: | |
Quote: this is how u use arrays!!
var num : array 1 .. 3 of int var num1 : array 1 .. 3 of int process doval loop for j : 1 .. 3 num1 (j) := 400 end for for j : 1 .. 3 num1 (j) := num1 (j) - Rand.Int (1, 50) end for for i : 1 .. 3 drawfilloval (num (i), num1 (i), 5, 5, blue) delay (100) drawfilloval (num (i), num1 (i), 6, 6, white) end for exit when num1 (1) < 0 or num1 (2) < 0 or num1 (3) < 0 end loop end doval for i : 1 .. 4 loop y := 400 for a : 1 .. 3 num (a) := Rand.Int (1, 300) end for fork doval delay (1000) end loop end for that aint gonna teach him buddy x_X ... lol try explaining it to him... cos like this is just a bunch of code to him : P and as mentioned before... procecsses are evil ![]() ![]() |
Author: | eNc [ Fri Jan 21, 2005 12:17 am ] |
Post subject: | |
basketball4ever wrote: Quote: this is how u use arrays!!
var num : array 1 .. 3 of int var num1 : array 1 .. 3 of int process doval loop for j : 1 .. 3 num1 (j) := 400 end for for j : 1 .. 3 num1 (j) := num1 (j) - Rand.Int (1, 50) end for for i : 1 .. 3 drawfilloval (num (i), num1 (i), 5, 5, blue) delay (100) drawfilloval (num (i), num1 (i), 6, 6, white) end for exit when num1 (1) < 0 or num1 (2) < 0 or num1 (3) < 0 end loop end doval for i : 1 .. 4 loop y := 400 for a : 1 .. 3 num (a) := Rand.Int (1, 300) end for fork doval delay (1000) end loop end for that aint gonna teach him buddy x_X ... lol try explaining it to him... cos like this is just a bunch of code to him : P and as mentioned before... procecsses are evil ![]() ![]() Umm well heres what i think it does, now i could be wrong but just confirm this for me please, in the first process it sets all the values in num1 array to 400 then it sets all the values in the array num1 to num1 - a random number from 1, 50, then it draws 3 ovals each with x, and y values which are relative to the num1 array value stored in the location that i points to, it then draws a white circle over it after the time delay, then it chesk to see if the num1 value stored in the array is less than 0 and so on, then quits loop if true, the process is ended, here's where im not sure, it seems to create a for loop which will execute 4 times but only executes 1ce because the inner loop never really stops, then in the inner for loop it sets the array num value to a random number, it fills the array this way, ends for loop, it executes doval, and then delays and then ends loop and loops around again. Please correct me if I'm wrong anywhere, I'm always willing to learn more. |
Author: | eNc [ Fri Jan 21, 2005 12:17 am ] |
Post subject: | |
btw thanks |
Author: | cycro1234 [ Fri Jan 21, 2005 12:21 am ] |
Post subject: | |
So u wanna learn arrays EH? Willing to learn more, EH? Then go to http://www.compsci.ca/v2/viewtopic.php?t=366 for an excellent tutorial on arrays ![]() |
Author: | eNc [ Fri Jan 21, 2005 9:52 am ] | ||
Post subject: | |||
Heres my updated code, its still not working well.
|
Author: | Cervantes [ Fri Jan 21, 2005 3:48 pm ] |
Post subject: | |
cycro1234 wrote: So u wanna learn arrays EH? Willing to learn more, EH? Then go to http://www.compsci.ca/v2/viewtopic.php?t=366 for an excellent tutorial on arrays
![]() I already posted a link to that tutorial. And then eNc said he already knew how to use arrays... ![]() eNc: You're still using processes. Don't. It is easier and better if you don't. |
Author: | Neo [ Fri Jan 21, 2005 4:39 pm ] | ||
Post subject: | |||
Heres a working one, study it ![]()
|
Author: | MysticVegeta [ Sat Jan 22, 2005 3:10 pm ] | ||
Post subject: | |||
Or may be some cool snow effect!
|
Author: | eNc [ Sat Jan 22, 2005 3:30 pm ] |
Post subject: | |
Beautiful, the snow effect is exactly what i'm looking for. 10 bits to u |
Author: | Cervantes [ Sat Jan 22, 2005 7:21 pm ] |
Post subject: | |
"exactly what i'm looking for" as in "that's what my project was. I'm going to hand your code in and say it was mine?" For your sake, I hope not. |
Author: | MysticVegeta [ Sat Jan 22, 2005 8:22 pm ] |
Post subject: | |
eNc wrote: Beautiful, the snow effect is exactly what i'm looking for. 10 bits to u
w00t thanks ![]() |