When I abort my charge state: it returns to the ready state 'visually' as normal, but the sound for the charge is still playing. Any idea on how I could cut that sound off?
The bits that I thought would be relevant.
stateName[0] = "Activate";
stateSequence[0] = "Activate";
stateTimeoutValue[0] = 0.3;
stateTransitionOnTimeout[0] = "Ready";
stateSound[0] = WLighterOpenSound;
stateName[1] = "Ready";
stateSequence[1] = "Ready";
stateTransitionOnTriggerDown[1] = "Charge";
stateAllowImageChange[1] = true;
stateName[2] = "Charge";
stateTransitionOnTimeout[2] = "Armed";
stateTimeoutValue[2] = 1.2;
stateSequence[2] = "Charge";
stateSound[2] = WLighterCloseSound;
stateWaitForTimeout[2] = false;
stateTransitionOnTriggerUp[2] = "AbortCharge";
stateEmitter[2] = WFlameEmitter;
stateEmitterTime[2] = 0.75;
stateEmitterNode[2] = "firePoint";
stateScript[2] = "onCharge";
stateAllowImageChange[2] = true;
stateName[3] = "AbortCharge";
stateTransitionOnTimeout[3] = "Ready";
stateTimeoutValue[3] = 0.05;
stateWaitForTimeout[3] = true;
stateScript[3] = "onAbortCharge";
stateAllowImageChange[3] = true;
stateName[4] = "Armed";
stateTimeoutValue[4] = 0.3;
stateTransitionOnTriggerUp[4] = "Fire";
stateEmitter[4] = WDynamiteSparkEmitter;
stateEmitterTime[4] = 0.4;
stateEmitterNode[4] = "sparkPoint";
stateSound[4] = WDynamiteLitSound;
stateAllowImageChange[4] = true;
stateWaitForTimeout[4] = False;
stateTransitionOnTimeout[4] = "Armed";
stateName[5] = "Fire";
stateTransitionOnTimeout[5] = "Done";
stateTimeoutValue[5] = 0.5;
stateFire[5] = true;
stateScript[5] = "onFire";
stateWaitForTimeout[5] = true;
stateAllowImageChange[5] = true;
stateName[6] = "Done";
stateScript[6] = "onDone";
function WDynamiteImage::onAbortCharge(%this, %obj, %slot)
{
%obj.playthread(2, root);
}