Heh, I know that feeling. It took me a while to figure out how to make PlayIdle work on the player. If I had not come across that Valhalla SMG mod, I¨m not sure I could have cracked it.
Success!!!Placing it in an object or spell script works. The spell can be applied by using CastImmediateOnSelf.
Figures it would take magic to get this working. It may take a little more set up, but definitely worth it to make something easy to call.
Note that when the animation starts, the animation object is equipped. If the player holds a showel in his or her hands, this must be unequipped, unless you want the player to have two shovels.
Also for this particular animation, the player must be in a non-combative stance. Otherwise, the player holds the shovel all wrong throughout the animation. I can find the shovel check and subsequent unequipitem commands in the original Point Lookout script, but not sure what was done about stance. Unless when unequipitem is called on players equipped weapon, the player automatically goes into a non combat stance?
And since I only have a 3rd person animation, is it possible to force the perspective through script? Guess I could also run a check and not alow digging in first person. As a note, in first person there IS an animation sequence, but no shovel. Equipping the shovel as a weapon though almost works.