Quote: "
LOAD bitmap "runner.bmp",1
FOR y=0 to 1
FOR x=0 to 6
GET IMAGE 1+x+(y*7),(x*89),(y*120),(x*89)+89,(y*120)+120
NEXT x
NEXT y
delete bitmap 1
LOAD bitmap "runner 2.bmp",2
FOR y=0 to 1
FOR x=0 to 6
GET IMAGE 2+x+(y*7),(x*89),(y*120),(x*89)+89,(y*120)+120
NEXT x
NEXT y
delete bitmap 2
"
Looks to me like the problem is here. You are grabbing images 1 to 14 in the first stage and then grabbing images 2 to 15 in the second.
You are effectively overwriting images 2 to 14 from the first sequence, with the images from the second sequence.
Try this:
LOAD bitmap "runner.bmp",1
newImage = 1
FOR y=0 to 1
FOR x=0 to 6
INC newImage
GET IMAGE newImage,(x*89),(y*120),(x*89)+89,(y*120)+120
NEXT x
NEXT y
delete bitmap 1
LOAD bitmap "runner 2.bmp",2
FOR y=0 to 1
FOR x=0 to 6
INC newImage
GET IMAGE newImage,(x*89),(y*120),(x*89)+89,(y*120)+120
NEXT x
NEXT y
delete bitmap 2
This way, the first sequence uses images from 1 to 14 and since we do not reset the newImage variable, it continues from 15 to 28.
Now in the rightkey: and leftkey: sections, you would do this:
if rightkey()=1
newImage = 1
gosub rightkey
endif
if leftkey()=1
newImage = 15
gosub leftkey
endif
rightkey:
IF newImage > 12 THEN newImage = 2
sprite 1,xpos,ypos,newImage
INC newImage
print "right"
cls
RETURN
leftkey:
IF newImage > 26 THEN newImage = 16
sprite 1,xpos,ypos,image
INC newImage
print "left"
cls
RETURN
Thinking about this a little more, this might not be exactly right, but I'm out of time and have to go. This should get you closer to the goal anyway.
Please let me know if it helps.
[Edit]
Doesn't look like you set the sprite up using the Sprite command. You may need to do this, if you are getting an error about the sprite not existing.
For that matter, what are you seeing?
[/Edit]
Thank you
JHA