----------------------------------- pink00rock Wed Feb 25, 2004 1:02 am Don't Understand the SnowFall Program!! heLP! plz? ----------------------------------- Hey there, This code was submitted by AsianSensation. I don't want to steal it or anything, but i want to make a program that is similar to it. The only problem is that i don't understand the program.. can someone explain it to me please? thank you so much . - sunny. View.Set ("offscreenonly") colorback (blue) cls type SnowType : record X, Y, Spd, Size : int end record var Snow : array 1 .. 100 of SnowType for rep : 1 .. 100 Snow (rep).X := Rand.Int (5, 645) Snow (rep).Y := Rand.Int (5, 475) Snow (rep).Spd := Rand.Int (1, 3) Snow (rep).Size := Snow (rep).Spd end for loop for rep : 1 .. 100 Snow (rep).Y -= Snow (rep).Spd if Snow (rep).Y < Snow (rep).Size then Snow (rep).Y := Rand.Int (475, 575) end if drawfilloval (Snow (rep).X, Snow (rep).Y, Snow (rep).Size, Snow (rep).Size, white) end for View.Update cls end loop thx - bye. ----------------------------------- pink00rock Wed Feb 25, 2004 1:05 am ----------------------------------- and i was also wondering how i could get a picture on side.. like how everyone else has it? i'm a newbie so yeah lol. andd i'm sorry for posting this here.. not sure where to post this type of question. yup. see yeah for now. ----------------------------------- Paul Wed Feb 25, 2004 2:31 pm ----------------------------------- What kind of picture do you want? like a picture you found? then you use this kind of code: var picture := Pic.FileNew ("picture.bmp") Pic.Draw (picture, 150, 70, picMerge) ----------------------------------- pink00rock Wed Feb 25, 2004 4:44 pm ----------------------------------- nooo i meant.. k u know how under your nick name is on the left side of the page INCLUDING your pciture underneath it.. how can i do that? i want a picture under my nick? and where do i go to do that.. thx bye! ----------------------------------- jonos Wed Feb 25, 2004 4:48 pm ----------------------------------- you should have used the turing reference man, the code there works and you will learn off it if you do a little reading. i would say more, but i will wait for shorthair to appear and do it right. anyways, read up on records in the turing reference and the tutorial in the turing tutorial part of the site. anyways, i can't really explain the code because im not too familiar with records, but you could probably figure it out by reading up on it. http://www.compsci.ca/v2/viewtopic.php?t=2325#20752 there is a very nice tutorial by your favourite spammer dodge tomahawk. ----------------------------------- Paul Wed Feb 25, 2004 5:14 pm ----------------------------------- Oh avatars, me an jonos misunderstood, we're dummies. Refer to: http://www.compsci.ca/v2/faq.php under the subtitle of: User preferences and Settings ----------------------------------- AsianSensation Thu Feb 26, 2004 5:12 pm ----------------------------------- basicly, I created 100 snow "objects" that have their own coordinates, speed and size. I run a for loop to generate the values for these "objects" and then in the main loop, I just subtract the position of each snowflake by it's speed. And if it goes under the 0 line, so that you can't see it anymore, I just reassign some random position for the snowflake above the screen, so the snow is continuous, and I don't have to create new snow "objects" so it doesn't take up that much memory. I did create a better snow program, it's somewhere on compsci, it's basicly the same idea, except the snow blows in 2D, instead of going straight down.