Author Topic: Repetitive-Readying  (Read 1573 times)

I have a problem (obviously). Whenever my gun fires, it plays the "Ready" animation sequence. I tried removing the "Ready" section of the script after the "Fire" section and it didnt help, just made it play WITH the sound.

Code without "Ready":
Code: [Select]
stateName[4] = "Reload";
stateSequence[4]                = "Reload";
stateTransitionOnTriggerDown[4]  = "Fire";
stateTransitionOnTriggerUp[4]     = " ";
stateSequence[4] = " ";

   stateName[4]         = "Reload";
   stateSequence[4]                = "Reload";
   stateTransitionOnTriggerDown[4]  = "Fire";
   stateTransitionOnTriggerUp[4]     = " ";
   stateSequence[4]   = " ";

   stateName[4]         = "Reload";
   stateSequence[4]                = "Reload";
   stateTransitionOnTriggerDown[4]  = "Fire";
   stateTransitionOnTriggerUp[4]     = " ";
   stateSequence[4]   = " ";

so place "Reload" in
Code: [Select]
stateSequence[4] = " ";

Get rid of the second one, and post all of the state sequences, not just the reload.

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

stateName[1]                     = "Ready";
stateTransitionOnTriggerDown[1]  = "Fire";
stateAllowImageChange[1]         = true;
stateSequence[1] = "Ready";

stateName[2]                    = "Fire";
stateTransitionOnTimeout[2]     = "Smoke";
stateTimeoutValue[2]            = 0.09;
stateFire[2]                    = true;
stateAllowImageChange[2]        = false;
stateSequence[2]                = "Fire";
stateScript[2]                  = "onFire";
stateWaitForTimeout[2] = true;
stateEmitter[2] = AUG_A2FlashEmitter;
stateEmitterTime[2] = 0.08;
stateEmitterNode[2] = "muzzleNode";
stateSound[2] = AUG_A2Shot1Sound;
stateEjectShell[2]       = true;

stateName[3] = "Smoke";
stateEmitter[3] = AUG_A2SmokeEmitter;
stateEmitterTime[3] = 0.12;
stateEmitterNode[3] = "muzzleNode";
stateTimeoutValue[3]            = 0.0;
stateTransitionOnTimeout[3]     = "Reload";

stateName[4] = "Reload";
stateSequence[4]                = "Reload";
stateTransitionOnTriggerDown[4]  = "Fire";
stateTransitionOnTriggerUp[4]     = " ";
like that?


   // Initial start up state
   stateName[0]                     = "Activate";
   stateTimeoutValue[0]             = 0.23;
   stateTransitionOnTimeout[0]       = "Ready";
   stateSequence[0]   = "Ready";
   stateSound[0]               = weaponReady;

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

   stateName[2]                    = "Fire";
   stateTransitionOnTimeout[2]     = "Smoke";
   stateTimeoutValue[2]            = 0.09;
   stateFire[2]                    = true;
   stateAllowImageChange[2]        = false;
   stateSequence[2]                = "Fire";
   stateScript[2]                  = "onFire";
   stateWaitForTimeout[2]         = true;
   stateEmitter[2]               = AUG_A2FlashEmitter;
   stateEmitterTime[2]            = 0.08;
   stateEmitterNode[2]            = "muzzleNode";
   stateSound[2]               = AUG_A2Shot1Sound;
   stateEjectShell[2]       = true;

   stateName[3] = "Smoke";
   stateEmitter[3]               = AUG_A2SmokeEmitter;
   stateEmitterTime[3]            = 0.12;
   stateEmitterNode[3]            = "muzzleNode";
   stateTimeoutValue[3]            = 0.0;
   stateTransitionOnTimeout[3]     = "Reload";

   stateName[4]         = "Reload";
   stateSequence[4]                = "Reload";
   stateTransitionOnTriggerDown[4]  = "Fire";
   stateTransitionOnTriggerUp[4]     = "Ready";
Bolded means I changed it, the problem of it continuously 'readying' is that the ready animation was on the state that would be constant if you're not firing. So I changed it to the first activate state. The second change is so the thing can actually loop if you hold down the mouse button. Otherwise it would shoot, but if you let go it wouldn't work anymore.

Hope it works.

didnt work, now it plays two Ready animations when i fire... or equip i dont remember, i tried it a little while ago... :(

Why not place the ready sequence in the ready state? :S
Then it will play the ready animation when you have it equipped (since it will go from activate to ready state) and when you let go of the fire button after the reload.

Never mind, i see what and why.

You want it so that the gun only plays it's ready sequence when it equips and not after the reload right?
If so, then HellsHero should have made the right code.
If that isn't what you want, make sure it's the ready sequence that it's playing that you want to remove.

Other then that, i can't think of something else.
HellsHero should have the right code.

Also, this should be moved to code section. ;)

maybe its a model-related problem, it was working fine till i updated the model and its animations

maybe its a model-related problem, it was working fine till i updated the model and its animations
Hmm, that's odd.
Check the model then.

ive been updating the model over time and im currently at version 4 of the model, and for some reason whenever i export the model, it retains the animation sequence things for the export from version 3


ill just revert to the last version of it i guess

sorry for quad post


does it have anything to do with the arrangement of the animations on the timeline? it just happened to another weapon!