Blockland Forums > Modification Help
Weapon playing weapon switch sound after timeout value
Pages: (1/1)
ShadowsfeaR:
--- Code: --- // Initial start up state
stateName[0] = "Activate";
stateTimeoutValue[0] = 0.07;
stateTransitionOnTimeout[0] = "Ready";
stateSound[0] = RailgunSwapSound;
stateName[1] = "Ready";
stateTransitionOnTriggerDown[1] = "Fire";
stateAllowImageChange[1] = true;
stateSequence[1] = "Ready";
stateName[2] = "Fire";
stateTimeoutValue[2] = 1.5;
stateFire[2] = true;
stateAllowImageChange[2] = false;
stateScript[2] = "onFire";
stateWaitForTimeout[2] = true;
stateEmitter[2] = RailgunFlashEmitter;
stateEmitterTime[2] = 0.01;
stateEmitterNode[2] = "muzzleNode";
stateSound[2] = RailgunShotSound;
stateName[3] = "Check";
stateTransitionOnTriggerUp[3] = "Ready";
stateTransitionOnTriggerDown[3] = "Fire";
--- End code ---
I dunno whats going on here but I after the gun fires, it plays the weapon swap sound. I want it to play the sound whenever I switch to the gun, but not after it fires. I'm not very good at scripting, so this is probably an easy fix for most of you ._.
Port:
You have a state timeout value (stateTimeoutValue) but you aren't defining what state to change to with stateTransitionOnTimeout, so it goes to the first state (Activate).
ShadowsfeaR:
--- Quote from: Port on June 02, 2012, 01:32:54 PM ---You have a state timeout value (stateTimeoutValue) but you aren't defining what state to change to with stateTransitionOnTimeout, so it goes to the first state (Activate).
--- End quote ---
Where is this? In the second state?
Fixed it. Thanks a bunch. :3
Pages: (1/1)