Here's the Rocket Launcher's series of states it follows to do what it does:
// Initial start up state
stateName[0] = "Activate";
stateTimeoutValue[0] = 0.1;
stateTransitionOnTimeout[0] = "Ready";
stateSound[0] = weaponSwitchSound;
stateName[1] = "Ready";
stateTransitionOnTriggerDown[1] = "Fire";
stateAllowImageChange[1] = true;
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateSequence[1] = "Ready";
stateName[2] = "Fire";
stateTransitionOnTimeout[2] = "Smoke";
stateTimeoutValue[2] = 0.1;
stateFire[2] = true;
stateAllowImageChange[2] = false;
stateSequence[2] = "Fire";
stateScript[2] = "onFire";
stateWaitForTimeout[2] = true;
stateEmitter[2] = rocketLauncherFlashEmitter;
stateEmitterTime[2] = 0.05;
stateEmitterNode[2] = tailNode;
stateSound[2] = rocketFireSound;
stateSequence[2] = "Fire";
//stateEjectShell[2] = true;
stateName[3] = "Smoke";
stateEmitter[3] = rocketLauncherSmokeEmitter;
stateEmitterTime[3] = 0.05;
stateEmitterNode[3] = "muzzleNode";
stateTimeoutValue[3] = 0.1;
stateSequence[3] = "TrigDown";
stateTransitionOnTimeout[3] = "CoolDown";
stateName[5] = "CoolDown";
stateTimeoutValue[5] = 0.5;
stateTransitionOnTimeout[5] = "Reload";
stateSequence[5] = "TrigDown";
stateName[4] = "Reload";
stateTransitionOnTriggerUp[4] = "Ready";
stateSequence[4] = "TrigDown";
stateName[6] = "NoAmmo";
stateTransitionOnAmmo[6] = "Ready";
};
Basically the way animations work is that they are called when their respective state comes up. So let's say you want to make a barrel of the weapon spin while it fires, you animate the barrel and name the Animation sequencing material:
seq:fire=firstrame-lastframe, cyclic (blank if not cyclic), fps=##
Let's say you want to make a Reload animation, well you will name the sequencing material:
seq:Reload=etc.
The animation will play when the rocketlauncher image reaches the reload state.
You can also add a new state, let's say a state called ChargeUp, and then make an animation for it and call the sequencing material:
seq:ChargeUp=etc.
There were also animations for Projectiles, and someone posted those a while ago. Projectiles only have a Loop and Start animation. A model also isn't restricted to only one animation so you can make weapons that basically go nuts.
That's animation in a nutshell.
Edit: I need to stop saying "basically".