Computer Science Canada Help with randint+moving |
Author: | Hellclan [ Wed Nov 17, 2004 12:41 pm ] |
Post subject: | Help with randint+moving |
IS there a way to get "THE" to scroll up or do i have to do it the agonsing way by increasing it by ten each tiem the loop is done ??? var lowtx : int var lowty : int var thightx : int var hightx : int var thighty : int var highty : int var hlx : int var hly : int var hrx : int var hry : int var hmidx : int var hmidy : int var etx : int var ety : int var ebx : int var eby : int var emidx : int var emidy : int var ebackx :int var ebacky :int for i : 1 .. 1000 delay (5) randint (lowtx, 50, 80) randint (lowty, 30, 110) randint (hightx, 20, 110) randint (highty, 110, 140) var hllowtx : int randint (hly,30,140) randint (hlx,160,190) randint (hrx,230,260) randint (hry,30,140) randint (hmidx,190,230) randint (hmidy, 70,100) randint (etx,350,400) randint (ety,110,140) randint (ebx,350,400) randint (eby,30,50) randint (emidx,350,400) randint (emidy,70,90) randint (ebackx,310,350) randint (ebacky,30,140) % drawbox (50, 30, 80, 110, 4) % drawbox (20, 110, 110, 140, 4) % drawbox (160,30,190,140,4) % drawbox (190,70,230,100,4) % drawbox (230,30,260,140,4) % drawbox (310,10,350,140,4) % drawbox (350,110,400,140,4) % drawbox (350,60,400,90,4) % drawbox (350,10,400,30,4) drawdot (lowtx, lowty, 50) drawdot (hightx,highty,50) drawdot (hlx,hly,50) drawdot (hrx,hry,50) drawdot (hmidx,hmidy,50) drawdot (etx, ety, 50) drawdot (ebx,eby,50) drawdot (emidx,emidy,50) drawdot (ebackx,ebacky,50) end for for i : 1 .. 10000 for x : 1..200 delay(1000) delay (10) randint (lowtx, 50, 80) randint (lowty, 30, 110+i) randint (hightx, 20, 110) randint (highty, 110, 140+i) var hllowtx : int randint (hly,30,140+i) randint (hlx,160,190) randint (hrx,230,260) randint (hry,30,140+i) randint (hmidx,190,230) randint (hmidy, 70,100+i) randint (etx,350,400) randint (ety,110,140+i) randint (ebx,350,400) randint (eby,30,50+i) randint (emidx,350,400) randint randint (emidy,70,90+i) randint (ebackx,310,350) randint (ebacky,30,140+i) % drawbox (50, 30, 80, 110, 4) % drawbox (20, 110, 110, 140, 4) % drawbox (160,30,190,140,4) % drawbox (190,70,230,100,4) % drawbox (230,30,260,140,4) % drawbox (310,10,350,140,4) % drawbox (350,110,400,140,4) % drawbox (350,60,400,90,4) % drawbox (350,10,400,30,4) drawdot (lowtx, lowty, 50) drawdot (hightx,highty,50) drawdot (hlx,hly,50) drawdot (hrx,hry,50) drawdot (hmidx,hmidy,50) drawdot (etx, ety, 50) drawdot (ebx,eby,50) drawdot (emidx,emidy,50) drawdot (ebackx,ebacky,50) end for end for Btw the drawbox is there to show the template of the letters |
Author: | Cervantes [ Wed Nov 17, 2004 3:28 pm ] | ||||
Post subject: | |||||
Create an offset variable. Or, two.
then, when you are doing your randints:
I don't really know what you mean by "the agonsing way by increasing it by ten each tiem the loop is done". Maybe what I suggest is what you are referring to. But what I suggested isn't agonizing |
Author: | Hellclan [ Wed Nov 17, 2004 3:42 pm ] |
Post subject: | |
Cool even though i dont really nkow how to use that command thx and i will try to learn how to use it (im a n UBER noob) |
Author: | Cervantes [ Wed Nov 17, 2004 5:04 pm ] |
Post subject: | |
what command? offsetX and offsetY are just variables. Say, offsetX is 100 and offsetY is 150. Then the bottom left corner of your "the" would be at (100, 150), because of the addition of both offset values to all your randints. |
Author: | Hellclan [ Wed Nov 17, 2004 5:25 pm ] |
Post subject: | |
THANKS Realzies the equation to life E=Hellclan is a dunce |