Author Topic: Image State Animations not playing if transitioned from onAmmo State [Fixed]  (Read 555 times)

Code: [Select]
stateName[0]                     = "Activate";
stateTimeoutValue[0]             = 0.01;
stateTransitionOnTimeout[0]      = "ReloadCheckA";
stateSound[0] = weaponSwitchSound;

stateName[1]                     = "ReloadCheckA";
stateTimeoutValue[1] = 0.01;
stateScript[1] = "onReloadCheckA";
stateTransitionOnTimeout[1] = "ReloadCheckB";

stateName[2]                     = "ReloadCheckB";
stateTransitionOnNoAmmo[2] = "ReloadCheckC";
stateTransitionOnAmmo[2] = "Idle";

stateName[3]                     = "Idle";
stateTransitionOnTriggerDown[3] = "FireDouble";

stateName[4]                    = "FireDouble";
stateTransitionOnTimeout[4]     = "Smoke";
stateTimeoutValue[4]            = 0.14;
stateFire[4]                    = true;
stateAllowImageChange[4]        = false;
stateSequence[4]                = "Root";
stateScript[4]                  = "onFireDouble";
stateWaitForTimeout[4] = true;
stateEmitter[4] = gunFlashEmitter;
stateEmitterTime[4] = 0.05;
stateEmitterNode[4] = "muzzleNode";

stateName[5] = "Smoke";
stateEmitter[5] = gunSmokeEmitter;
stateEmitterTime[5] = 0.2;
stateEmitterNode[5] = "muzzleNode";
stateTimeoutValue[5]            = 0.4;
stateTransitionOnTimeout[5]     = "UnloadDoubleStart";

stateName[6] = "UnloadDoubleStart";
stateSequence[6] = "break";
stateScript[6]                  = "onBreakDouble";
stateTransitionOnTimeout[6]     = "UnloadDoubleA";
stateAllowImageChange[6]        = false;
stateTimeoutValue[6]            = 0.25;

stateName[7] = "UnloadDoubleSingle";
stateSequence[7] = "breakB";
stateScript[7]                  = "onBreakDouble";
stateTransitionOnTimeout[7]     = "ReloadRightWait";
stateAllowImageChange[7]        = false;
stateTimeoutValue[7]            = 0.25;

stateName[8] = "UnloadDoubleEmpty";
stateSequence[8] = "breakC";
stateScript[8]                  = "onBreakDouble";
stateTransitionOnTimeout[8]     = "ReloadDoubleStart";
stateAllowImageChange[8]        = false;
stateTimeoutValue[8]            = 0.25;

stateName[9]    = "UnloadDoubleA";
stateSequence[9] = "unload";
stateScript[9]                  = "onUnload";
stateEjectShell[9]       = true;
stateTimeoutValue[9]            = 0.01;
stateTransitionOnTimeout[9]     = "UnloadDoubleB";

stateName[10] = "UnloadDoubleB";
stateEjectShell[10]       = true;
stateTimeoutValue[10]            = 0.01;
stateTransitionOnTimeout[10]     = "ReloadDoubleStart";

stateName[11] = "ReloadDoubleStart";
stateTimeoutValue[11] = 0.2;
stateTransitionOnTimeout[11] = "ReloadLeftRelease";

stateName[12] = "ReloadLeftRelease";
stateTransitionOnTriggerUp[12] = "ReloadLeftWait";

stateName[13] = "ReloadLeftWait";
stateTransitionOnTriggerDown[13]= "ReloadLeft";

stateName[14] = "ReloadLeft";
stateSequence[14] = "leftReload";
stateTimeoutValue[14] = 0.2;
stateTransitionOnTimeout[14] = "ReloadRightRelease";
stateScript[14] = "onReloadLeft";

stateName[15] = "ReloadRightRelease";
stateTransitionOnTriggerUp[15] = "ReloadRightWait";

stateName[16] = "ReloadRightWait";
stateTransitionOnTriggerDown[16]= "ReloadRight";

stateName[17] = "ReloadRight";
stateSequence[17] = "rightReload";
stateTimeoutValue[17] = 0.2;
stateTransitionOnTimeout[17] = "ReloadUnBreak";
stateScript[17] = "onReloadRight";

stateName[18] = "ReloadUnBreak";
stateTimeoutValue[18]            = 0.2;
stateScript[18]                  = "onReloadUnBreak";
stateSequence[18] = "unbreak";
stateTransitionOnTimeout[18] = "ReloadEnd";

stateName[19] = "ReloadEnd";
stateTimeoutValue[19]            = 0.2;
stateScript[19]                  = "onReloadComplete";
stateTransitionOnTimeout[19]     = "Idle";

stateName[20]                     = "ReloadCheckC";
stateTimeoutValue[20] = 0.01;
stateScript[20] = "onReloadCheckB";
stateTransitionOnTimeout[20] = "ReloadCheckD";

stateName[21]                    = "ReloadCheckD";
stateScript[21] = "onReloadCheckC";
stateTransitionOnAmmo[21] = "UnloadDoubleSingle";
stateTransitionOnNoAmmo[21] = "UnloadDoubleEmpty";
On State 21 (ReloadCheckD)
any state transitioned from 'onAmmo' does not play any sequences up until reloading is complete
any state transitioned from 'onNoAmmo' and the animations work

if I swap the onAmmo and onNoAmmo the animations for "UnloadDoubleSingle" work fine but then the "UnloadDoubleEmpty" animations stop working and vice versa

wtf is going on
« Last Edit: August 04, 2015, 04:19:41 AM by Swollow »

I worked around this issue by using
imageLoaded
instead

I still have no idea why said situation produces no animations