looping graphics
Author |
Message |
mrbuttercups
|
Posted: Fri May 10, 2013 11:49 am Post subject: looping graphics |
|
|
What is it you are trying to achieve?
I am tryng to create a background with a moving cloud in a loop (cloud being multiple fill boxes
What is the problem you are having?
I have the coding for four looping fill boxes but only the first moves
Describe what you have tried to solve this problem
I have tried to move it and add and remove parts but nothing seems to work.
Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
drawfillbox (1, 1, 2000, 12323, 53) %background
drawfillbox (1, 1, 10000, 160, 120)
drawfilloval (455, 125, 106, 26, 16)
drawfilloval (455, 125, 105, 25, 6)
drawfilloval (455, 125, 101, 21, 16)
drawfilloval (455, 125, 100, 20, 68) %platform 2
drawfilloval (160, 60, 106, 26, 16)
drawfilloval (160, 60, 105, 25, 6)
drawfilloval (160, 60, 101, 21, 16)
drawfilloval (160, 60, 100, 20, 68) %platform 1
loop
for count : 100 .. 700
drawfilloval (count, 300, 60, 60, white)
View.Update
delay (10)
drawfilloval (count, 300, 60, 60, 53)
end for
end loop
loop
for cloud1 : 50 .. 650
drawfilloval (cloud1, 320, 60, 40, white)
View.Update
delay (10)
drawfilloval (cloud1, 320, 60, 40, 53)
end for
end loop
loop
for clounder : 50 .. 650
drawfilloval (clounder, 290, 70, 40, white)
View.Update
delay (10)
drawfilloval (clounder, 290, 70, 40, 53)
end for
end loop
loop
for cort : 120 .. 720
drawfilloval (cort, 300, 50, 40, white)
View.Update
delay (10)
drawfilloval (cort, 300, 50, 40, 53)
end for
end loop
Please specify what version of Turing you are using
4.1.1 |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Insectoid
|
Posted: Fri May 10, 2013 12:25 pm Post subject: RE:looping graphics |
|
|
code: | loop
for count : 100 .. 700
drawfilloval (count, 300, 60, 60, white)
View.Update
delay (10)
drawfilloval (count, 300, 60, 60, 53)
end for
end loop |
Does this loop ever end? Does the code below it ever execute?
You have four loops that all do almost exactly the same thing- the only changes are the for loop ranges and the properties of the ovals. Why not try putting it all in the same loop instead of for separate ones? |
|
|
|
|
|
|
|