Ok totally sorted the problem and addedd some nice "features" :)
Now the sprite roll left & right correctly from the CURRENT frame,and if a joypad isn't pressed for some time the ship reset its position facing up.
Thanks for the help.
Now the sprite roll left & right correctly from the CURRENT frame,and if a joypad isn't pressed for some time the ship reset its position facing up.
width=640 height=480 Graphics width,height,0,1 prova=LoadImage("jet1.bmp") MidHandle prova prova2=LoadAnimImage("jet-strip.bmp",43,52,0,5) MidHandle prova2 Global x=320 Global y=240 While Not KeyHit(1) assex=JoyX()*2 assey=JoyY()*2 SetBuffer BackBuffer() Cls x=x+assex y=y+assey If x => 630 Then x=x-2 If x <= 10 Then x=x+2 If startmov=0 Then fotogramma=2 If Not JoyX()=1 And JoyX()=-1 If MilliSecs()> counter+500 ;millisecs() > start_anim+500 then fotogramma=2 counter=MilliSecs() startmov=0 EndIf EndIf If JoyX()=1 Then startmov=1 If MilliSecs() > timer + 100 timer=MilliSecs() ;EndIf current_frame=fotogramma fotogramma=current_frame+1 If fotogramma => 4 Then fotogramma=4 ;Else fotogramma=2 EndIf EndIf If JoyX()=-1 Then startmov=1 If MilliSecs() > timer + 100 timer=MilliSecs() ;EndIf current_frame=fotogramma fotogramma=current_frame-1 If fotogramma < 0 Then fotogramma=0 ;Else fotogramma=2 EndIf EndIf DrawImage prova2,x,y,fotogramma Flip Wend
Thanks for the help.