This is a script that allows you to create dynamic animations using only Lua. Two example stances are included. It is obviously for coders. There is no use for the average gmod user.
Use Entity(1):SetLuaAnimation("staffholdspell") or Entity(1):SetLuaAnimation("stancetest") and then turn third person mode on to see the examples. staffholdspell will only work correctly if you have a weapon out that uses the ACT_HL2MP_IDLE_MELEE2 group.
Download API + editor:
CURRENT (SVN): svn://noxiousnet.com/trunk/public/gmod13/animationsapi
CURRENT (DDL): http://heavy.noxiousnet.com/boneanimlibv5.rar
Hooking up with your addon/gamemode/whatever
include("boneanimlib.lua") in the server code. include("cl_boneanimlib.lua") in the client code. You are now ready to make calls to the API.
It's suggested you put this stuff in its own folder.
An editor is included. Type animate in the console to open it. I did not make the editor.
FrameData table structure
float RU, float RR, float RF - Rotate up, rotate right, rotate forward. What you'll most likely be using for all animations.
float MU, float MR, float MF - Move up, move right, move forward. Usually not used unless you really know what you're doing or want to make some wacky looking animations.
Animation table structure
integer Type - The type of animation it is. Can be one of these: TYPE_GESTURE, TYPE_STANCE, TYPE_SEQUENCE, TYPE_POSTURE. See the script for more info on each.
integer Interpolation - Can be one of these: INTERP_LINEAR, INTERP_COSINE, INTERP_CUBIC, INTERP_DEFAULT. Determines how the animation is smoothed between frames. Linear is no smoothing. Cosine is the best quality/compatibility balance. Cubic will smooth the best but your animation frames may overflow in to each other.
table FrameData - See above and the examples inside the code.
function PreCallback(pl, sGestureName, tGestureTable, iCurFrame, tFrameData, fFrameDelta) - Allows you to do work on the animation before being processed. Perform actions on tGestureTable.
function ShouldPlay(pl, sGestureName, tGestureTable, iCurFrame, tFrameData, fFrameDelta, fPower) - If this exists and doesn't return true then the animation stops early.
Awesome Strike: Source uses a few animations made with this system.