I was bored so I quickly made this code to show you how to make Vegeta walk. I scaled the vegeta image to 520,340 though to make it more workeable, so if you want to run this code directly, you'll have to do that too.
`Walking Vegeta sprite
`By Kentaree
`Set up program environment
set display mode 800,600,16
sync on: sync rate 60
load bitmap "vegeta.jpg",1: `Load the image to a bitmap so multiple frames can be grabbed
image=1: `Set image number grabbed
for y=0 to 1: `2 Rows of images, so 2 values for y
for x=0 to 3: `4 Columns of images, so 4 values for x
`Grab an image every x*130 positions horizontally and y*169 vertically
get image image,x*130,y*170,((x+1)*130)-1,((y+1)*170)-1
inc image: `Increment the value of image, so next image can be grabbed
next x
next y
`Bitmap used to grab images from is no longer necessary, so delete it from memory
`for optimal speed
delete bitmap 1
`Set x and y positions to place sprite on
x=10
y=50
sprite 1,x,y,1: `Put sprite 1, at coordinates x,y, displaying image number 1
`Main program loop
do
if rightkey()=1 and x<560: `If right arrow is pressed and sprite is well on screen
for spriteNo=1 to 4
inc x,5: `Increment sprite's x position by 5
sprite 1,x,y,spriteNo: `Put sprite 1, at x,y displaying image number spriteNo
sleep 50: `short break so animation works optimally
next spriteNo
spriteNo=1: `Reset Vegeta back to original stance, looking right
endif
if leftkey()=1 and x>18
for spriteNo=5 to 8
dec x,5: `Decrement sprite's x position by 5
sprite 1,x,y,spriteNo: `Put sprite 1, at x,y displaying image number spriteNo
sleep 50: `short break so animation works optimally
next spriteNo
spriteNo=5: `Reset Vegeta back to original stance, looking left
endif
sync: `Sync the screen
loop
Whatever I did I didn't do it!