
-----------------------------------
nightfeng2
Mon Nov 15, 2010 8:00 pm

Animating a car built with drawline+drawfill. need help
-----------------------------------
Hi guys,
I made a car and i want to make it move, here is the code


 drawline (0, 20, 0, 40, 7) %back of the car

    drawline (0, 40, 40, 40, 7)

    drawline (40, 40, 60, 60, 7)

    drawline (60, 60, 120, 60, 7)

    drawline (120, 60, 140, 40, 7)

    drawline (140, 40, 180, 40, 7)

    drawline (180, 40, 180, 20, 7)

    drawline (180, 20, 140, 20, 7)

    drawoval (120, 20, 20, 20, 7) %front tire

    drawline (100, 20, 80, 20, 7)

    drawoval (60, 20, 20, 20, 7) %back tire

    drawline (40, 20, 0, 20, 7)

    drawfill (110, 50, 40, 7) %fills the car

    drawfill (120, 20, 7, 7) %fills front tire

    drawfill (60, 20, 7, 7) %fills back tire

    drawfilloval (120, 20, 10, 10, 0) %front tire inner ring
    drawfilloval (60, 20, 10, 10, 0) %back tire inner ring
    %%%mirror
    drawline (55, 45, 65, 55, 7)
    drawline (65, 55, 115, 55, 7)
    drawline (115, 55, 125, 45, 7)
    drawline (125, 45, 55, 45, 7)
    drawfill (90, 52, 54, 7) %fills the mirror


so for me, it is hard to make it move because of the drawfill, when i use a loop the drawfill just fills the whole screen with colour. Can anyone make the car simply move to the right using if/else/loops??? thx.

-----------------------------------
TokenHerbz
Mon Nov 15, 2010 10:42 pm

RE:Animating a car built with drawline+drawfill. need help
-----------------------------------
Why not just draw it and then you can use the image and move it around, however if you want to use your code up top there, you'll need variables to "move" around, and you should start with the first x,y ones. see how that goes :)

-----------------------------------
nightfeng2
Mon Nov 15, 2010 10:50 pm

RE:Animating a car built with drawline+drawfill. need help
-----------------------------------
k ill use drawboxes instead

-----------------------------------
nightfeng2
Mon Nov 15, 2010 11:24 pm

RE:Animating a car built with drawline+drawfill. need help
-----------------------------------
got it
