scaleimage? I cant get it to work

Miscellaneous Forums/General Discussion/scaleimage? I cant get it to work

Hi guys,

Ive been trying to work the "scaleimage". Now Ive ceated a simple map (lets call it map) Can actually scale it. Then I add a player(call it player) and got that to work. I cant make both work at same time. I once got the player and map to show on screen at same time but player didnt move. After creating the const worked but left traces of the image everywere. So I did Cls. But cleared the map. I tried all kinds of combo's with cls,flip,scaleimage and so on. Why can I not make this work. If I have to, Ill show you the code.

StateTrooperDave

Which version of Blitz? Also, wrong forum.

blitzplus

I think we need to see your code for certain.

Wrong forum, but send the code.

ok her it is (tank is player)(map is test map)
Graphics 800,600,0,2

AutoMidHandle True
SetBuffer BackBuffer()
SeedRnd MilliSecs()

;load images
mapimage = LoadImage("art&graphics\art&tiles\test map b.bmp")
tankimage = LoadImage("art&graphics\graphics\tank.bmp")

;change just the numbers in the parenasis.
ScaleImage mapimage,Rnd(0.5,0.5),Rnd(0.5,0.5)


;constants
Const SPACEBAR = 57, UPKEY = 200, DOWNKEY = 208, RIGHTKEY = 205, LEFTKEY = 203

;types
Type tank
Field x,y
End Type

tank.tank = New tank

tank\x = 220
tank\y = 210

While Not KeyDown(1)

If KeyDown(203)
tank\x = tank\x - 10
EndIf
If KeyDown(205)
tank\x = tank\x + 10
EndIf
If KeyDown(200)
tank\y = tank\y - 10
EndIf
If KeyDown(208)
tank\y = tank\y + 10
EndIf
Cls
Flip
DrawImage mapimage,(400),(300)


MaskImage tankimage,255,255,255
DrawImage(tankimage ,tank\x,tank\y)


Flip
Wend

You don't need to have..

Cls
Flip

Draw....

Flip

Just do,

Cls

Draw.....

Flip

thanks, it worked! ihad one to many flip's

No worries.

Noswaith da