Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Animating a car built with drawline+drawfill. need help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
nightfeng2




PostPosted: Mon Nov 15, 2010 8:00 pm   Post subject: 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.
Sponsor
Sponsor
Sponsor
sponsor
TokenHerbz




PostPosted: Mon Nov 15, 2010 10:42 pm   Post subject: 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 Smile
nightfeng2




PostPosted: Mon Nov 15, 2010 10:50 pm   Post subject: RE:Animating a car built with drawline+drawfill. need help

k ill use drawboxes instead
nightfeng2




PostPosted: Mon Nov 15, 2010 11:24 pm   Post subject: RE:Animating a car built with drawline+drawfill. need help

got it
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: