moving car problem in turing please help
Author |
Message |
boom yo yo
|
Posted: Fri Feb 28, 2014 6:06 pm Post subject: moving car problem in turing please help |
|
|
What is it you are trying to achieve?
to make my car move across the screen using counting loops
What is the problem you are having?
car is just dragging across and cls isnt working for me
Describe what you have tried to solve this problem
adding cls
Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
Turing: |
setscreen ("graphics")
for counter : 1 .. 300
delay (50)
%body
drawfilloval (counter + 100, 100, counter + 100, 25, 4)
drawfilloval (counter + 190, 100, counter + 8, 5, 0)
%wheels
drawfilloval (counter + 50, 75, counter + 20, 20, 255)
drawfilloval (counter + 150, 75, counter + 20, 20, 255)
%cab
Draw.ThickLine (counter + 50, 120, counter + 70, 150, 4, 4)
Draw.ThickLine (counter + 150, 120, counter + 130, 150, 4, 4)
Draw.ThickLine (counter + 130, 150, counter + 70, 150, 4, 4)
Draw.ThickLine (counter + 100, 120, counter + 100, 150, 4, 4)
drawline (counter + 99, 75, 99, counter + 152, 0)
drawfilloval (counter + 60, 115, counter + 4, 1, 0)
drawfilloval (counter + 110, 115, counter + 4, 1, 0)
end for
|
Please specify what version of Turing you are using
4.1 |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Zren
|
Posted: Fri Feb 28, 2014 6:19 pm Post subject: RE:moving car problem in turing please help |
|
|
What happens when you use cls? Are you clearing the screen after the delay and before you start drawing the next frame of the animation? If you clear the screen before the delay after drawing everything, then you're not going to see anything during the entire delay.
Or is your animation flickering when your animation flickering when you use cls? |
|
|
|
|
|
keyboardwalker
|
Posted: Fri Feb 28, 2014 7:06 pm Post subject: RE:moving car problem in turing please help |
|
|
You're trying to move a car horizontally across the screen. Well, this means that you're going to have to increment the x locations of the "art" that you're drawing. Look at the documentation on each of the drawing functions and look at which parameters represent what and then compare it to what you're actually incrementing. When the car isn't being stretched and it's leaving a "trail" that's when you use cls. |
|
|
|
|
|
boom yo yo
|
Posted: Fri Feb 28, 2014 11:50 pm Post subject: Re: moving car problem in turing please help |
|
|
problem was fixed thanks |
|
|
|
|
|
|
|