Author Topic: Playertype Animation Problem {SOLVED}  (Read 2007 times)

Lately, I've been working on a new playertype, and it mostly works except for one part: The Animations.
I have my animation in a DSQ file called "Mushroom_Root.dsq", and I have a base shape file called "Orange_Mushroom.dts".
Here is the code for the playertype:
Code: [Select]
datablock TSShapeConstructor(OrangeMushroomDts)
{
baseShape  = "./Orange_Mushroom.dts";
sequence0  = "./Mushroom_Stand.dsq root";

sequence1  = "./Mushroom_Root.dsq run";
sequence2  = "./Mushroom_Root.dsq walk";
sequence3  = "./Mushroom_Root.dsq back";
sequence4  = "./Mushroom_Root.dsq side";

sequence5  = "./Mushroom_Root.dsq crouch";
sequence6  = "./Mushroom_Root.dsq crouchRun";
sequence7  = "./Mushroom_Root.dsq crouchBack";
sequence8  = "./Mushroom_Root.dsq crouchSide";

sequence9  = "./Mushroom_Root.dsq look";
sequence10 = "./Mushroom_Root.dsq headside";
sequence11 = "./Mushroom_Root.dsq headUp";

sequence12 = "./Mushroom_Root.dsq jump";
sequence13 = "./Mushroom_Root.dsq standjump";
sequence14 = "./Mushroom_Root.dsq fall";
sequence15 = "./Mushroom_Root.dsq land";

sequence16 = "./Mushroom_Root.dsq armAttack";
sequence17 = "./Mushroom_Root.dsq armReadyLeft";
sequence18 = "./Mushroom_Root.dsq armReadyRight";
sequence19 = "./Mushroom_Root.dsq armReadyBoth";
sequence20 = "./Mushroom_Root.dsq spearready";  
sequence21 = "./Mushroom_Root.dsq spearThrow";

sequence22 = "./Mushroom_Root.dsq talk";  

sequence23 = "./Mushroom_Root.dsq death1";

sequence24 = "./Mushroom_Root.dsq shiftUp";
sequence25 = "./Mushroom_Root.dsq shiftDown";
sequence26 = "./Mushroom_Root.dsq shiftAway";
sequence27 = "./Mushroom_Root.dsq shiftTo";
sequence28 = "./Mushroom_Root.dsq shiftLeft";
sequence29 = "./Mushroom_Root.dsq shiftRight";
sequence30 = "./Mushroom_Root.dsq rotCW";
sequence31 = "./Mushroom_Root.dsq rotCCW";

sequence32 = "./Mushroom_Root.dsq undo";
sequence33 = "./Mushroom_Root.dsq plant";

sequence34 = "./Mushroom_Root.dsq sit";

sequence35 = "./Mushroom_Root.dsq wrench";

   sequence36 = "./Mushroom_Root.dsq activate";
   sequence37 = "./Mushroom_Root.dsq activate2";

   sequence38 = "./Mushroom_Root.dsq leftrecoil";
};    


datablock PlayerData(OrangeMushroomArmor)
{
   renderFirstPerson = false;
   emap = false;
  
   className = Armor;
   shapeFile = "./Orange_Mushroom.dts";
   cameraMaxDist = 8;
   cameraTilt = 0.261;//0.174 * 2.5; //~25 degrees
   cameraVerticalOffset = 2.3;
   computeCRC = false;
  
   cameraDefaultFov = 90.0;
   cameraMinFov = 5.0;
   cameraMaxFov = 120.0;
  
   //debrisShapeName = "~/data/shapes/player/debris_player.dts";
   //debris = horseDebris;

   aiAvoidThis = true;

   minLookAngle = -1.5708;
   maxLookAngle = 1.5708;
   maxFreelookAngle = 3.0;

   mass = 90;
   drag = 0.1;
   density = 0.7;
   maxDamage = 450;
   maxEnergy =  10;
   repairRate = 0.33;

   rechargeRate = 0.4;

   runForce = 11 * 90;
   runEnergyDrain = 0;
   minRunEnergy = 0;
   maxForwardSpeed = 6;
   maxBackwardSpeed = 3;
   maxSideSpeed = 3;

   maxForwardCrouchSpeed = 6;
   maxBackwardCrouchSpeed = 3;
   maxSideCrouchSpeed = 3;

   maxForwardProneSpeed = 6;
   maxBackwardProneSpeed = 3;
   maxSideProneSpeed = 3;

   maxForwardWalkSpeed = 6;
   maxBackwardWalkSpeed = 3;
   maxSideWalkSpeed = 3;

   maxUnderwaterForwardSpeed = 2;
   maxUnderwaterBackwardSpeed = 1;
   maxUnderwaterSideSpeed = 1;
  
   thirdpersononly = 1;

   jumpForce = 7 * 90; //8.3 * 90;
   jumpEnergyDrain = 0;
   minJumpEnergy = 0;
   jumpDelay = 0;

   minJetEnergy = 0;
jetEnergyDrain = 0;
canJet = 0;

   minImpactSpeed = 250;
   speedDamageScale = 3.8;

   boundingBox = vectorScale("1 1 2", 4);
   crouchBoundingBox = vectorScale("1 1 2", 4);
  
   pickupRadius = 0.75;

   jetEmitter = "";
   jetGroundEmitter = "";
   jetGroundDistance = 4;
  
   //footPuffEmitter = LightPuffEmitter;
   footPuffNumParts = 10;
   footPuffRadius = 0.25;

   //dustEmitter = LiftoffDustEmitter;

   splash = PlayerSplash;
   splashVelocity = 4.0;
   splashAngle = 67.0;
   splashFreqMod = 300.0;
   splashVelEpsilon = 0.60;
   bubbleEmitTime = 0.1;
   splashEmitter[0] = PlayerFoamDropletsEmitter;
   splashEmitter[1] = PlayerFoamEmitter;
   splashEmitter[2] = PlayerBubbleEmitter;
   mediumSplashSoundVelocity = 10.0;  
   hardSplashSoundVelocity = 20.0;  
   exitSplashSoundVelocity = 5.0;

   // Controls over slope of runnable/jumpable surfaces
   runSurfaceAngle  = 85;
   jumpSurfaceAngle = 86;

   minJumpSpeed = 20;
   maxJumpSpeed = 30;

   horizMaxSpeed = 68;
   horizResistSpeed = 33;
   horizResistFactor = 0.35;

   upMaxSpeed = 80;
   upResistSpeed = 25;
   upResistFactor = 0.3;
  
   footstepSplashHeight = 0.35;

   //NOTE:  some sounds commented out until wav's are available

   JumpSound = HorseJumpSound;

   // Footstep Sounds
//   FootSoftSound        = HorseFootFallSound;
//   FootHardSound        = HorseFootFallSound;
//   FootMetalSound       = HorseFootFallSound;
//   FootSnowSound        = HorseFootFallSound;
//   FootShallowSound     = HorseFootFallSound;
//   FootWadingSound      = HorseFootFallSound;
//   FootUnderwaterSound  = HorseFootFallSound;
   //FootBubblesSound     = FootLightBubblesSound;
   //movingBubblesSound   = ArmorMoveBubblesSound;
   //waterBreathSound     = WaterBreathMaleSound;

   //impactSoftSound      = ImpactLightSoftSound;
   //impactHardSound      = ImpactLightHardSound;
   //impactMetalSound     = ImpactLightMetalSound;
   //impactSnowSound      = ImpactLightSnowSound;
  
   impactWaterEasy      = Splash1Sound;
   impactWaterMedium    = Splash1Sound;
   impactWaterHard      = Splash1Sound;
  
   groundImpactMinSpeed    = 10.0;
   groundImpactShakeFreq   = "4.0 4.0 4.0";
   groundImpactShakeAmp    = "1.0 1.0 1.0";
   groundImpactShakeDuration = 0.8;
   groundImpactShakeFalloff = 10.0;
  
   //exitingWater         = ExitingWaterLightSound;

   // Inventory Items
maxItems   = 10; //total number of bricks you can carry
maxWeapons = 5; //this will be controlled by mini-game code
maxTools = 5;

uiName = "Orange Mushroom";
rideable = true;
lookUpLimit = 0.6;
lookDownLimit = 0.2;

canRide = false;
showEnergyBar = false;
paintable = true;

brickImage = horseBrickImage; //the imageData to use for brick deployment
};    



Here is what the animation should look like:


Here is what it looks like now:


Do you know what is wrong?
« Last Edit: August 14, 2010, 10:34:48 AM by Chao »

Do your joints need to be linked?


Son, is this MapleStory?
:O

but

is there not a way to edit the speed?

It's not a speed problem.  I have a speed of 15 FPS for the Animation.

Oh right, now I see that a few frames are cut out.

quite a few.

Perhaps you didn't export all of the animation?

I don't know.

No, I exported keyframes 1 - 30.

I think I know what it's doing.
When I spawn the mushroom, it plays the animation.  After the first keyframe, it plays the animation again, thus not palying more of the previous animation.  How to I fix this?  I told it that the animation was between keyframes 1 - 30, and I have cyclic turned on (I tried it already with it turned off, no use).

The root animations should only have one keyframe (should be completely still)
If it does, the animation looks glitchy, just like your problem.

Try changing it with the walk/run animation.

The root animations should only have one keyframe (should be completely still)
If it does, the animation looks glitchy, just like your problem.
Yeah, but for the root sequence, it should be playing a animation where it is just doing nothing.

Ok, I just downloaded and installed showtool, and everything plays fine there too!  If it plays fine in showtool, it's supposed to do the same ingame, right?

The problem has been solved.

The problem has been solved.
It helps if you state how you fixed it in case others run into this problem.

It helps if you state how you fixed it in case others run into this problem.

Yes please