My experience with animations is limited, so let me ask you some basics:
If the animation is a play-once as you suggested, is there a way for the script to detect the end of the cycle, so it can reorder it to play again in synch? I suppose relying just on timing would not be reliable.
I believe so (look at the listed functions at bottom of this link's page): http://cs.elderscrolls.com/constwiki/index.php/IsMovingForward
If you use "IsAnimPlaying" function to check if the cart is already playing one of it's wheel rotation animations, you can prevent the cart from playing the same or another anim too soon.
Also, I hope you're using OBSE for this, to be able to use the "IsAnimGroupPlaying" function, to help the parented horse and cart communicate with each other so that if the horse plays its "FastForward" anim, the cart plays the "Backward" animation (as you associated it below).
So all together, something roughly like this on the cart (the horse should be the "parent" ref, and the cart the "child" ref):
Begin Gamemode
set refVar to GetParentRef
if IsAnimPlaying == 1 ;; if cart is currently playing an animation, it won't play an animation again until the anim is done playing
return
elseif refVar.IsAnimGroupPlaying 7 == 1 ;; if horse is doing the fast forward anim
Playgroup Backward 0 ;; cart plays fast forward wheel animation once
elseif refVar.IsAnimGroupPlaying 4 == 1 ;; horse going slow backward
Playgroup Left 0 ;; cart plays slow backward animation once
....etc.....
Would it be possible to setup four continuous-looping animations: a wheel-turn forward, a forward fast, a backward and a backward fast? And associate then with the anim groups Forward, Backward, Left and Right? If this is possible, it would be just a matter of using the PlayGroup function at the right times.
Yes and no to first question: 1)
No - you can't have the animations within the cart nif itself, be set to looping under the NiControllerSequence. You want those four animations, to be individually set up under a NiControllerManager. And under the NiControllerSequence for each of them, you want the setting that is "CYCLE_CLAMP", under "Clamp Type" in Block Details of Nifskope, so that each anim plays once and does not continously loop once started.
2)
Yes - The above script sample I wrote, takes this into account. With the script, the cart anims that play only once, will keep playing/looping over and over as long as the conditions are met.
You don't want the cart nif itself to have looping movement animations set up within it, because there is no guarantee that the horse will keep trotting on continously. It is possible to have another anim within the cart nif that is a "stationary wheel" animation with a "CYCLE_CLAMP" setting (plays only once) - you can play this anim to stop the looping anim, until you call the looping anim again. But the problem with this approach, is one of sudden 3D mesh and texture state jumps - because you can't determine at what 3D wheel mesh state the wheel will visually be at in the looping anim, when you need to call the "stationary wheel" anim.
To answer second questions:Yes, you can use those four animation groups and associate each of them to the horse's different animation movement states.
Koniption