Author Topic: Sword attack speed help  (Read 844 times)

How would i increase the speed of the sword attack in the server.cs? I know it might be simple but i dont understand much of this so yeah.

Weapon attack speeds are based on how quickly they cycle through the Fire state (unless you rename it to attack or something like that.) This state can be identified from the others by the segment:
Code: [Select]
stateFire[#] = true; # would be replaced with an actual number, usually 2 for most weapons.

In order to change how quickly the states cycle you need to change the following code segment:
Code: [Select]
stateTimeoutValue[#] = ###;Make sure the # in the [ ] is the same as the one you found the stateFire[], assuming that the delay comes from the fire state, if it does not, change other timeout values after the fire.
The ### is a number that represents the delay in seconds. (1.00 is 1 second)

Lower timeouts in the sword item to increase its rate of fire.
(I don't have access to my Blockland files atm so I can't physically check the exact Weapon_Sword details, so this is just a generalized guide on how to do this for any weapon.)
« Last Edit: April 09, 2014, 11:31:29 AM by Rykuta »

(I don't have access to my Blockland files atm so I can't physically check the exact Weapon_Sword details, so this is just a generalized guide on how to do this for any weapon.)

   stateName[3]                    = "Fire";
   stateTransitionOnTimeout[3]     = "CheckFire";
   stateTimeoutValue[3]            = 0.2;
   stateFire[3]                    = true;
   stateAllowImageChange[3]        = false;
   stateSequence[3]                = "Fire";
   stateScript[3]                  = "onFire";
   stateWaitForTimeout[3]      = true;

So what i need to know is if i would have to reanimate the sword, because the time for the strike is perfect, but the animation plays for a second or two after the hit.

So what i need to know is if i would have to reanimate the sword, because the time for the strike is perfect, but the animation plays for a second or two after the hit.
Does the sword use the default blockhead animations or does it have its own special swing? Because if it has its own unique animation then you won't need to do anything special, since the timeout value is coincidentally also the speed of the weapon animation. Otherwise you'll need to do something else to get it to line up better. Not too much more, it's a fairly easy task, just depends on how the default sword actually works.