Author Topic: Animations  (Read 618 times)

How would I play an animation when I pull out a weapon?  I already have the animation exported, I just need to find a way to play it.

Edit:  Makanix is working on the project too.
« Last Edit: October 17, 2009, 11:04:17 PM by Gadgethm »

Also, what is the correct way to export an animation. So we know we are doing it right.


We're using Milkshape.  Does that mean that we should export a .dsq for a weapon animation?  That makes no sense.  Other weapons have animations without .dsq files.  We just need to know the scripting command for playing the animation.

We're using Milkshape.  Does that mean that we should export a .dsq for a weapon animation?  That makes no sense.  Other weapons have animations without .dsq files.  We just need to know the scripting command for playing the animation.
No don't export the animations into .dsq.

The animations are played from the states in the image datablock, like this:

   stateSequence[1]   = "Ready";

and
   stateSequence[NUMBER]   = "Reload";

And etc.

Ok so this is for a lightsaber extending. The sequence is called ExtendLS and it has 28 sequences. How would that work for the script?

stateSequence[NUMBER] = "ExtendLS";
(Probably your ready state)

sorry im still a bit confused... so i add a new sequence to this:

Code: [Select]
   // Initial start up state
stateName[0]                     = "Activate";
stateTimeoutValue[0]             = 0.5;
stateTransitionOnTimeout[0]      = "Ready";
stateSound[0]                    = MxToyLightsaberDrawSound;

stateName[1]                     = "Ready";
stateTransitionOnTriggerDown[1]  = "PreFire";
stateAllowImageChange[1]         = true;

stateName[2] = "PreFire";
stateScript[2]                  = "onPreFire";
stateAllowImageChange[2]        = false;
stateTimeoutValue[2]            = 0.1;
stateTransitionOnTimeout[2]     = "Fire";

stateName[3]                    = "Fire";
stateTransitionOnTimeout[3]     = "CheckFire";
stateTimeoutValue[3]            = 0.2;
stateFire[3]                    = true;
stateAllowImageChange[3]        = false;
stateSequence[3]                = "Fire";
stateScript[3]                  = "onFire";
stateWaitForTimeout[3] = true;
//stateTransitionOnTriggerUp[3] = "StopFire";

stateName[4] = "CheckFire";
stateTransitionOnTriggerUp[4] = "StopFire";
stateTransitionOnTriggerDown[4] = "Fire";


stateName[5]                    = "StopFire";
stateTransitionOnTimeout[5]     = "Ready";
stateTimeoutValue[5]            = 0.2;
stateAllowImageChange[5]        = false;
stateWaitForTimeout[5] = true;
stateSequence[5]                = "StopFire";
stateScript[5]                  = "onStopFire";



};

ive looked in other add ons with animation and i see no change between the one with and without animation. or am i looking in the wrong place?

Here:

   stateName[1]                     = "Ready";
   stateTransitionOnTriggerDown[1]  = "PreFire";
   stateAllowImageChange[1]         = true;

Add

stateSequence[1] = "ExtendLS";

I found out how. It works now thanks anyway!

Only I added mine to StateSequence[0]. Is that ok? It works...

Yeah it should be fine.