Image frame skip?

BlitzPlus Forums/BlitzPlus Beginners Area/Image frame skip?

Ice T.(Posted 2007) [#1]
I couldnt help but notice, that when using an image where different tables are made for different actions such as walking both ways or even an attack, that if one row of images exceeds another, then the next action takes up the empty spot of the extended row:

x = image frame
b = blank spot


ex. x x b
x x b
x x x

so when I arrange to use the 2nd action, the frames it takes is...

x x (b
x) x b
x x x

-the blank spot and the fallowing image frame,

I was just wondering if there was a way to fix the problem of mixing the next action up with a blank spot and only one of its own frames like with a frame skip or something else.

thanx


b32(Posted 2007) [#2]
I have trouble understanding what you mean ? Here are just some ideas that spring to mind:

Maybe it helps to write the table down as 9x1 instead of 3x3 ?
x x b x x b x x x

Maybe you could arrange the images in a more logical way?
x x x
x x x
x b b

Else, you could define what frames you want to draw:
action1: 0 1 3 4
action2: 2 5
You could use an array (Dim), a Type and/or a Read..Data structure.

If you are quite sure the images should be/remain in a certain order, you could also create a formula/function to get the right frames:
action1 = (currentframe mod 2) + ((currentframe mod 4 / 2) * 3)
action2 = (currentframe mod 2) * 3 + 2

If this doesn't make sense or help at all, could you please explain your problem a bit further ?


Ice T.(Posted 2007) [#3]
the 9x1 makes a lot of sense now, it was just the hassle before to have blank frames mix with the frames that I actually needed made up my actions.