Author Topic: Model animation names?  (Read 1573 times)

What other animation names can be used for models in MS3D, i know these ones

fire - Animation plays when item is fired
equip - Animation plays when equipped
reload - This does work right? That shotgun has one

What others are there to be used? And explain what they do please
« Last Edit: October 14, 2007, 01:22:32 PM by Masterlegodude »



state
idle

What would those do?
idle would be while its not moving
state would be the animation whiles it moving (i think)

You can use any animation names. The state system in the weapon image defines when they play. Look in the shotgun script for stateSequence and one of them is set to "reload". If i renamed the animation in my shotgun to roostergun and changed that stateSequence to roostergun it would have no effect on the shotgun at all.

What about the animation name you want to play when you crouch? Is that possible?

Here's the Rocket Launcher's series of states it follows to do what it does:

Code: [Select]
   // 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".
« Last Edit: October 26, 2007, 02:54:24 PM by Muffinmix »

As Ephialtes said, the name of the animation can be anything. Just change the statesequence[n] to the name of that animation.