Computer Science Canada simple graphics.....i feel stupid |
Author: | void [ Tue Apr 08, 2003 6:10 pm ] |
Post subject: | simple graphics.....i feel stupid |
can anyone give me code that will draw a straight line down the screen....i want it to grow at the top of the screen (maxy) and end at the botton (0 or 1).....the line must be straight and it must be a line that draws itself at one length and after a delay of 10 it redraws over the prvious one...heading in the same direction...and grows...so its like falling from the sky...leaving a streak behind.... thanks alot ![]() |
Author: | Dan [ Tue Apr 08, 2003 10:32 pm ] | ||
Post subject: | |||
there are a few ways to do this the esites amd 1st idea that comes to mind is using the Draw.Dot comand in a for loop ie.
you can ajust the agale a bit by chage the amout i2 chages each time. aloutgh i think that there is a better way to do this maticaky, but i cant think riight now it is latte. |
Author: | void [ Wed Apr 09, 2003 6:51 am ] |
Post subject: | |
thats the way i did it...but my teaches being a f@g.....its okay...im pretty sure if i hand in the assignment as a standalong he wont bother trying to check the code..muhuhuhuhuahaahahahaha.. |
Author: | Blade [ Wed Apr 09, 2003 7:34 am ] |
Post subject: | |
but then... would hee have anything to mark? lol ![]() |
Author: | void [ Wed Apr 09, 2003 4:04 pm ] | ||
Post subject: | |||
okay....this is what i've done so far....can someone plz change it so that if the randomly selected co-ordinate is hit by my circle then it will say hit :>....thanks a bunch....i've been trying to do this for quite a long time but i cant manage to think lately.... ![]() |
Author: | Asok [ Wed Apr 09, 2003 4:53 pm ] | ||
Post subject: | |||
I decided to help you out with this one, here's the code make sure ya understand what's going on. When you click on your randomly selected pixel distance from the pixel is = 0 thus hit. enjoy ![]() |
Author: | void [ Wed Apr 09, 2003 5:35 pm ] |
Post subject: | |
thanks...that is what i was trying to do...i didnt know what parameters to use for the function...i just wrote if distance=0....i assumed the comp knew what i was talking about....but it didnt...so i deleted it and hoped there was an easier way to do it....dont worry....u didnt help an idiot...u helped a temporarily idiot-ified person.... ![]() |
Author: | Martin [ Wed Apr 09, 2003 6:37 pm ] |
Post subject: | |
if you want to have an object that you can hit, just make the if distance (...) to be < 10 for 10 pixels away for example. Although I'm sure that you already knew that |
Author: | void [ Wed Apr 09, 2003 7:21 pm ] |
Post subject: | |
yea i did...but thanks any way.... ![]() |