I have a sprite in position and when the z and x keys are pressed an attack is shown. How do I make the sprite move left and keep moving left when or right when I press a key like adding a number to variable x to move the sprite across the screen or subtratct from it to move backwards. Also right now the attack sprites are in the same position as the starting position I know I would have to change them to match where ever the sprite is standing when it is moved on screen but I can not figure that out either. Can someone please show me how these two things can be done
HIDE MOUSE
LOAD BITMAP "BACKGROUND.BMP",1
LOAD IMAGE "BACKGROUND.BMP",1
SPRITE 1,X,Y,1
LOAD BITMAP "HERO SPRITE SHEET.BMP",2
LOAD IMAGE "HERO SPRITE SHEET.BMP",2
GET IMAGE 2,137,1178,206,1298
SPRITE 2,110,250,2
SET SPRITE 2,1,1
DO
IF SCANCODE()=44
LOAD SOUND "Voice164.WAV",1
PLAY SOUND 1
GET IMAGE 2,278,1180,365,1298
SPRITE 2,110,250,2
WAIT 100
GET IMAGE 2,684,832,940,934
SPRITE 2,110,250,2
WAIT 10
GET IMAGE 2,15,828,293,931
SPRITE 2,110,250,2
WAIT 100
GET IMAGE 2,137,1178,206,1298
SPRITE 2,110,250,2
ENDIF
IF SCANCODE()=45
LOAD SOUND "Voice162.WAV",1
PLAY SOUND 1
GET IMAGE 2,563,193,688,267
SPRITE 2,110,300,2
WAIT 10
GET IMAGE 2,429,276,563,345
SPRITE 2,120,300,2
WAIT 100
GET IMAGE 2,137,1178,206,1298
SPRITE 2,120,250,2
ENDIF
IF SCANCODE()=46
OFFSET SPRITE 2,-25,Y
ENDIF
LOOP
"The Infamous J Nice"