So, I don't have much coding experience (for UDK my main position is an animator) and I wanted to change something that Unreal does.
Unreal scales your firing animation based on your fireinterval. For automatic weapons, this makes the animation look sped up (because I have a recoil and kick-back to origin that would happen after you let go of the trigger). I attempted to correct this by looking at the UTWeapon script, and then, overwriting the script/function in my new EOWeapon script.
I tried many variations of editing this, such as removing FireModeNum from the function's body, and then I also tried replacing FireModeNum with DefaultAnimSpeed, and obviously, I have no clue what I'm doing so I could use a little assist.
Is there a way I can make the firing animation play at the default speed the animation is animated at rather than scaling it based on the FireInterval?
Thanks, and all help appreciated.
Unreal scales your firing animation based on your fireinterval. For automatic weapons, this makes the animation look sped up (because I have a recoil and kick-back to origin that would happen after you let go of the trigger). I attempted to correct this by looking at the UTWeapon script, and then, overwriting the script/function in my new EOWeapon script.
Code:
/********************************************/
simulated function PlayFireEffects( byte FireModeNum, optional vector HitLocation )
{
// Play Weapon fire animation
if ( FireModeNum < WeaponFireAnim.Length && WeaponFireAnim[FireModeNum] != '' )
PlayWeaponAnimation( WeaponFireAnim[FireModeNum], GetFireInterval(FireModeNum) );
if ( FireModeNum < ArmFireAnim.Length && ArmFireAnim[FireModeNum] != '' && ArmsAnimSet != none)
PlayArmAnimation( ArmFireAnim[FireModeNum], GetFireInterval(FireModeNum) );
// Start muzzle flash effect
CauseMuzzleFlash();
ShakeView();
}
Is there a way I can make the firing animation play at the default speed the animation is animated at rather than scaling it based on the FireInterval?
Thanks, and all help appreciated.