And what about when clicking buttons to move left or right, so far this code works but the sprite kind of glides instantly to the left or right
sync on
sync rate 30
Rem Load the sprite sheet into an animated sprite
create animated sprite 1,"TargWR1.png",4,1,1
Load Image "LeftRightCont1.png",5
mrspriteX=200
mrspriteY=200
mx = MouseX()
my = MouseY(
Do
Mx=MouseX(): My=MouseY(): Mc=MouseClick()
Gosub WalkR
Sync
Loop
End
WalkR:
Rem Show the sprite at 200,200
sprite 1,mrspriteX,mrspriteY,1
Rem Load Buttons
sprite 5,5,5,5
Rem Play the sprite 4 frames at a rate of 200
Rem play sprite 1,1,4,200
Rem Check Area Of Button Left
If Mx > 0 and My > 0 And Mx < 18 And My < 17
If Mc=1 then mrspriteX=mrspriteX-20
play sprite 1,1,4,200
Else mrspriteX=mrspriteX + 0
Rem Check Area Of Button Right
If Mx > 22 and My > 0 And Mx < 36 And My < 17
If Mc=1 then mrspriteX=mrspriteX+20
play sprite 1,1,4,200
Else mrspriteX=mrspriteX + 0
Sync
endif
endif
Return
FPS Creator Updated 116,Vista 32Bit UpTo Date, nVidea 8500 1Gig Graphics Card, 4 Gig DDR2 Ram, Intel Duel Core 3GHZ CPU