The formula is Character Sprite No + Direction*Steps + Step W1 is the cycle period W2 is the number of steps