Author Topic: sword animations  (Read 994 times)

sorry if back topic but how do you animate a sword like new swings?

Oh god, your back. Anyway, look in the "States" part of the code.

Oh god, your back. Anyway, look in the "States" part of the code.

where was i?                 the states part oh ok thx

edit


this thing ?

  // Images have a state system which controls how the animations
   // are run, which sounds are played, script callbacks, etc. This
   // state system is downloaded to the client so that clients can
   // predict state changes and animate accordingly.  The following
   // system supports basic ready->fire->reload transitions as
   // well as a no-ammo->dryfire idle state.

   // Initial start up state
   stateName[0]                     = "Activate";
   stateTimeoutValue[0]             = 0.5;
   stateTransitionOnTimeout[0]      = "Ready";
   stateSound[0]                    = swordDrawSound;

   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;

   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";
« Last Edit: February 14, 2009, 04:52:43 PM by yndaaa »




...


what i have the torque game engine and it needs .dsq animations so blockland weapons dont need it?

well how do i make the sword 2handed?

Player types need .dsq-based animations and a TSShapeConstructor, as can be seen in the 'Horse' files.

Weapons, Vehicles and other basic models use animations embedded in the .dts file.

To make the sword two-handed you would have to make a new .dsq for the minifigure to adjust the mount points and have you holding the sword with both hands. To do this, you'd probably need the source file of m.dts, which has not been released.

Player types need .dsq-based animations and a TSShapeConstructor, as can be seen in the 'Horse' files.

Weapons, Vehicles and other basic models use animations embedded in the .dts file.

To make the sword two-handed you would have to make a new .dsq for the minifigure to adjust the mount points and have you holding the sword with both hands. To do this, you'd probably need the source file of m.dts, which has not been released.

but racer did it for zacks rpg thing

Easy way: model hand with sword and unmount the hands on a script

You can do it like that, but then your hands will randomly change colour or sometimes change completely (from a hook) when you use the item, which looks odd.

ok do you know how to color the model or is that with the script?