Hiya all
I have try to move the red tank on the hill but it doesnt matter if I put 500,Y as it still on top left hand corner....it there a command to tell to move tank on where the position I want them to be?
[CODE]
Const ESCAPE=27
Graphics 640,480,0
Y=400
Cls
SetColor 255,0,0
DrawRect 0,0,20,10 ' Tank body
DrawRect 0,0,10,10 ' Tank Head
Local Tank_1=CreateImage(20,20,1,DYNAMICIMAGE|MASKEDIMAGE)
GrabImage Tank_1,100,50
While Not KeyDown(ESCAPE)
Hill()
DrawImage Tank_1,0,y
Flip
Wend
End
Function Hill()
Local sinetable[359]
For angle = 0 To 359
sinetable(angle) = 50 * Sin(angle)
Next
angle = 0
For x = 0 To 639
SetColor 0,255,0
DrawLine x, sinetable(angle) + 240,x,639
angle = angle + 1
If angle = 360 Then angle = 0
Next
End Function
[/CODE]
cheers
I have try to move the red tank on the hill but it doesnt matter if I put 500,Y as it still on top left hand corner....it there a command to tell to move tank on where the position I want them to be?
[CODE]
Const ESCAPE=27
Graphics 640,480,0
Y=400
Cls
SetColor 255,0,0
DrawRect 0,0,20,10 ' Tank body
DrawRect 0,0,10,10 ' Tank Head
Local Tank_1=CreateImage(20,20,1,DYNAMICIMAGE|MASKEDIMAGE)
GrabImage Tank_1,100,50
While Not KeyDown(ESCAPE)
Hill()
DrawImage Tank_1,0,y
Flip
Wend
End
Function Hill()
Local sinetable[359]
For angle = 0 To 359
sinetable(angle) = 50 * Sin(angle)
Next
angle = 0
For x = 0 To 639
SetColor 0,255,0
DrawLine x, sinetable(angle) + 240,x,639
angle = angle + 1
If angle = 360 Then angle = 0
Next
End Function
[/CODE]
cheers