1
Modification Help / Gatling Gun Animation
« on: September 29, 2017, 09:49:22 AM »
I've been trying to make a Gatling Gun for Blockland recently. It's based on Kajes old Minigun Add-On but I can't seem to get the animation to work, it will either play once when you equip it and sometimes even on triggerup but it'll stand still during firing if the animation is non cyclic. If the animation is cyclic however it won't stop spinning once you equip it.
As far as I can tell it should play the "ready" animation when you equip it, the "Spin" animation on trigger down and the "Fire" animation during firing. But if I leave the "ready" animation blank it'll still play the "Spin" animation whenever I equip it. Can someone tell me why?
Code: [Select]
stateName[0] = "Activate";
stateTimeoutValue[0] = 0.15;
stateTransitionOnTimeout[0] = "Ready";
stateSound[0] = weaponSwitchSound;
stateName[1] = "Ready";
stateTransitionOnTriggerDown[1] = "Spinup";
stateAllowImageChange[1] = true;
stateSequence[1] = "ready";
stateName[2] = "Spinup";
stateAllowImageChange[2] = false;
stateTransitionOnTimeout[2] = "Fire";
stateTimeoutValue[2] = 1.00;
stateWaitForTimeout[2] = true;
//stateSound[2] = minigunShot1Sound;
stateSequence[2] = "Spin";
stateTransitionOnTriggerUp[2] = "Ready";
//stateSequenceOnTimeout[2] = "Spin";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Smoke";
stateTimeoutValue[3] = 0.01;
stateFire[3] = true;
stateAllowImageChange[3] = false;
//stateSequence[3] = "Fire";
stateScript[3] = "onFire";
stateWaitForTimeout[3] = true;
stateEmitter[3] = gunFlashEmitter;
stateEmitterTime[3] = 0.01;
stateEmitterNode[3] = "muzzleNode";
stateSound[3] = gunShot1Sound;
stateEjectShell[3] = true;
stateName[4] = "Smoke";
stateEmitter[4] = minigunSmokeEmitter;
stateEmitterTime[4] = 0.05;
stateEmitterNode[4] = "muzzleNode";
stateTimeoutValue[4] = 0.01;
stateTransitionOnTimeout[4] = "Check";
stateName[5] = "Check";
stateTransitionOnTriggerUp[5] = "Slow";
stateTransitionOnTriggerDown[5] = "Fire";
stateName[6] = "Slow";
stateTransitionOnTriggerDown[6] = "Fire";
//stateSequence[6] = "ready";
stateEmitter[6] = minigunSmokeEmitter;
stateEmitterTime[6] = 1.00;
stateEmitterNode[6] = "muzzleNode";
stateAllowImageChange[6] = false;
stateTransitionOnTimeout[6] = "Ready";
stateTimeoutValue[6] = 1.00;
stateWaitForTimeout[6] = true;
};
As far as I can tell it should play the "ready" animation when you equip it, the "Spin" animation on trigger down and the "Fire" animation during firing. But if I leave the "ready" animation blank it'll still play the "Spin" animation whenever I equip it. Can someone tell me why?