Have you had a look at my tutorial on expressions?
http://www.hash.com/forums/index.php?showtopic=14193You have to understand how Mod() functions always giving you the remainder of a division.
Some examples:
0/3 gives the remainder 0
1/3 gives the remainder 1
2/3 gives the remainder 2
2.5/3 gives the remainder 2.5
And now we will have the same remainder 0 as before
3/3 gives the remainder 0
4/3 gives the remainder 1
5/3 gives the remainder 2
5.5 gives the remainder 2.5
And now we will have the same remainder - 0 - as twice before. Starting a new repetition.
6/3 gives the remainder 0
7/3 gives the remainder 1
Have you got it?
And to use the Mod() function to get the remainder - you have to write like this:
Mod(0,3) gives remainder 0
Mod(1,3) gives remainder 1
Have you got it?
But we do not want to write the values ourselves - we want to get them from the position on the timeline - GetTime() gives us the position on the timeline.
So if the animation is on frame 00:02:00 we will have the remainder 2
Mod(2,3) gives remainder 2
Mod(GetTime(),3) gives remainder 2 if we are at the position 00:02:00 at the timeline.
Have you got it?
Using 30 Frames Per Second - 30 FPS - for the animation and being on frame
00:02:29 GetTime() will give us the decimal value 2.9 - about that---
But we want to have the Pose set to about a hundred percent on that frame.
So we have to make a division with 3 to get 1 because 1 that is 100 percent.
On frame 00:00:00
Mod(GetTime(),3)/3 gives 0
On frame 00:00:15
Mod(GetTime(),3)/3 gives 0.5/3 that is about 16 percent
On frame 00:01:00
Mod(GetTime(),3)/3 gives 1/3 that is about 0.33 or in percent 33 percent
On frame 00:02:29
Mod(GetTime(),3)/3 gives 2.9/3 that is nealy 100 percent
On frame 00:03:00
Mod(GetTime(),3)/3 gives 0 and that is 0 percent
The repetion from 0 percent to a hundred percent starts all over again
Have you got it?