Your sprite animation is made up by 8 frames: 0-3 for walking right, 4-7 for walking left.
In your code, you use always the frame for right walking, in fact the statement used to change the frames is:
The above statement makes the values for frmman going from 0 to 3.
If you want to use also the frames for left animation, you should add 4 to the calculated frame, so that it goes from 4 to 7.
Of course, you have to decide when to use the left frames, and when to use the right ones.
In your code, you can easily achieve that, if you use the direction variable 'dir', which is set to 1 for going right, and -1 for going left. So you could do so:
Hope this has sense for you,
Sergio.
In your code, you use always the frame for right walking, in fact the statement used to change the frames is:
frmman=( frmman + 1 ) Mod 4
The above statement makes the values for frmman going from 0 to 3.
If you want to use also the frames for left animation, you should add 4 to the calculated frame, so that it goes from 4 to 7.
frmman=( frmman + 1 ) Mod 4 ;0 <---> 3 frmman = frmman + 4 ; 0+4 <---> 3+4
Of course, you have to decide when to use the left frames, and when to use the right ones.
In your code, you can easily achieve that, if you use the direction variable 'dir', which is set to 1 for going right, and -1 for going left. So you could do so:
[EDITED] Global frame ;put this in your variable declaration . . frame=( frame + 1 ) Mod 4 if dir = -1 then frmman = frame + 4 else frmman = frame endif
Hope this has sense for you,
Sergio.