Moving Box Upwards, Then Left HELP! D:
Author |
Message |
colinlamm
|
Posted: Fri Dec 16, 2011 8:24 pm Post subject: Moving Box Upwards, Then Left HELP! D: |
|
|
What is it you are trying to achieve?
Basically im trying to make a box float upwards, and then float to the left.
What is the problem you are having?
I already managed to make it float upwards, and when i attempted to make it move to the left i managed to create another box instead o_O
Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
Heres what i have so far, it MAY look kind of messy, im not sure, im a beginner.
setscreen ("graphics:800;600")
View.Set ("offscreenonly")
var Box_y, Box_y2, Box_x, Box_x2 : int %Moving the ipod Variables
Box_y := 10
Box_y2 := 40
Box_x := 10
Box_x2 := 40
%Moving the Ipod Touch upwards
exit when Box_y = 300
Draw.FillBox (380, Box_y, 400, Box_y2, black) %Ipod Touch
Draw.FillBox (350, 10, 450, 100, 90)
Box_y := Box_y + 10
Box_y2 := Box_y2 + 10
View.Update
delay (50)
%Moving the Ipod Touch left after it moves upwards
var Box1 :int
var Box2 :int
Box1:=380
Box2:=400
loop
Draw.FillBox (Box1,300,Box2,320,black)
Box1:=Box1-10
exit when Box1=200
View.Update
delay (50)
end loop
Please specify what version of Turing you are using
Turing 4.1 |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Insectoid
|
Posted: Fri Dec 16, 2011 9:01 pm Post subject: RE:Moving Box Upwards, Then Left HELP! D: |
|
|
If you're trying to move the same box, why do you have 2 variables each for X and Y?
Draw.FillBox (380, Box_y, 400, Box_y2, black)
Draw.FillBox (Box1,300,Box2,320,black)
Do the above lines look like they're drawing the same box? |
|
|
|
|
|
colinlamm
|
Posted: Fri Dec 16, 2011 9:10 pm Post subject: Re: RE:Moving Box Upwards, Then Left HELP! D: |
|
|
Insectoid @ Fri Dec 16, 2011 9:01 pm wrote: If you're trying to move the same box, why do you have 2 variables each for X and Y?
Draw.FillBox (380, Box_y, 400, Box_y2, black)
Draw.FillBox (Box1,300,Box2,320,black)
Do the above lines look like they're drawing the same box?
I wasnt exactly sure how to move the same box, so i was thinking that i would use cls after the box reached the floating part, and then i wud make it go left but i never tried it out yet
*Edit* i did try it out, and it ended up clearing up my whole screen. Is it possible to use Draw.FillBox (380, Box_y, 400, Box_y2, black) to move it to the right? |
|
|
|
|
|
|
|