
-----------------------------------
trend
Sun Jun 14, 2009 4:55 pm

Repeating objects
-----------------------------------
What is it you are trying to achieve?
I am trying to put windows on the buildings in my code.


What is the problem you are having?
How do I repeat the window object on each building?
I need 5 rows of windows with 3 windows on each row.
It would take really long if I drew each window. Help would be appreciated...Thanks!


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)

   %Buildings
            drawfill (100, 400, black, 1)
            drawfillbox (0, 0, 190, 290, grey)
            drawfillbox (190, 0, 280, 220, 113)
            drawfillbox (280, 0, 440, 270, grey)
            drawfillbox (440, 0, 640, 320, 113)
            drawfillbox (10, 250, 30, 270, yellow)

Please specify what version of Turing you are using
4.1v

-----------------------------------
BigBear
Sun Jun 14, 2009 5:28 pm

RE:Repeating objects
-----------------------------------
use a for loop and make the loop controlled variable multiplicative based on how far apart the buildings are
