Computer Science Canada help with an exit when statement! |
Author: | Randolf Nitler [ Tue Jan 15, 2008 7:46 pm ] | ||
Post subject: | help with an exit when statement! | ||
I have a fairly large problem with placing an exit when statement, or something along the same lines that will allow my missiles to land onto the ground when the y coordinate of the missile (currentYcorrdinate1, currentYcoordinate2) gets bellow y = 15. I want my program to then stop at that very point and draw my crater which i made in a for loop. The thing is, since the whole thing is in a loop, i want it to only draw the crater when the missile's y coordinate gets under y = 15, but it goes on drawing craters bellow 15. The second thing is, let's say i manage to get this fixed, i use an exit when statment to allow me to draw my crater. Then what, that stops my loop from running and i can't draw any more craters!, how would i get my loop to run again and draw another crater with a different power variable, or a different angle variable. I basically want my loop to restart, after the previous crater has been drawn so i can change the variable values and draw even more craters. What kind of a loop can i have to do this? I'd very much appreciate a quick response to my problem, and if you have any suggestions to make my life a lot easier, share your views. Thanks again!
|
Author: | syntax_error [ Tue Jan 15, 2008 8:17 pm ] |
Post subject: | Re: help with an exit when statement! |
life would be soo much easier if you simple used procs so hey heres a thought use procs and then the whole loop issue will be soo much simpler for you to get on your own I know not an answer you wanted *my heart bleeds* ![]() |
Author: | ericfourfour [ Tue Jan 15, 2008 9:15 pm ] |
Post subject: | RE:help with an exit when statement! |
You are going to have to store each crater you make. Look into arrays and records. There are guides in the Turing Walkthrough. |