
-----------------------------------
Don
Sat Jan 17, 2009 12:03 pm

Moving an object in Turing
-----------------------------------
Ok I need help animating how to move an object from left to right and keep going. Can someone tell me please how to move? Ok here is my program I want to animate across the screen and keep moving until the user closes it.

-----------------------------------
saltpro15
Sat Jan 17, 2009 12:29 pm

Re: Moving an object in Turing
-----------------------------------
It would be a lot easier to just find a JPEG image of an F22 and animate that using Input.KeyDown and Sprite.Animate, unless the plane has to be drawn with drawlines?[/syntax]

-----------------------------------
saltpro15
Sat Jan 17, 2009 12:30 pm

Re: Moving an object in Turing
-----------------------------------
It would be a lot easier to just find a JPEG image of an F22 and animate that using Input.KeyDown and Sprite.Animate, unless the plane has to be drawn with drawlines?

-----------------------------------
saltpro15
Sat Jan 17, 2009 12:30 pm

RE:Moving an object in Turing
-----------------------------------
sorry about the triple post, something went wrong

-----------------------------------
Don
Sat Jan 17, 2009 12:31 pm

RE:Moving an object in Turing
-----------------------------------
No the plane has to be drawn tho.

-----------------------------------
copthesaint
Sat Jan 17, 2009 12:40 pm

Re: Moving an object in Turing
-----------------------------------
Ok to do this you need two variables.

1 will move you drawing
1 will switch the position it's going

eg 


var  x, direction : int := 0
loop
if direction = 0 then
x+=1
if x >= maxx then
direction := 1
end if
elsif direction = 1 then
x-=1
if x 