Change the animation speed

JimWestJimWest Join Date: 2010-01-03 Member: 69865Members, Reinforced - Silver
Hi there,
any Idea how I could change the speed of some animations without editing the model file?
I want to do a fast reload upgrade for the combat mod.

I've already changed the kAnimationSpeedStep so all animations were faster (just for testing),
but when I reloaded the rifle and the animation was finished, I can't should and had to wait the normal time.

Comments

  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow
    You can edit the animation graph in the viewer tool which allows you to edit the speed at which animations run (which triggers the tags faster which is generally what is used to trigger reload complete events and such. You could also make it variable so you set a parameter similar to how enzyme works currently (modifies attack_speed for aliens).
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    edited September 2012
    The simple way to do this is in code. Firing speeds are controlled by the "attack_speed" animation, which is controlled by variables:

    Here is an excerpt from an email I got from Brian explaining how it works:


    Look in function <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->Alien:OnUpdateAnimationInput(modelMixin)

    That calls:
    modelMixin:SetAnimationInput("attack_speed", self:GetIsEnzymed() and kEnzymeAttackSpeed or kDefaultAttackSpeed)<!--c2--></div><!--ec2-->

    So the animation is faster when the Alien is enzymed.

    Catalyst for marines works in the same way. You already have that working in Combat mod....
  • JimWestJimWest Join Date: 2010-01-03 Member: 69865Members, Reinforced - Silver
    Thank you, fast reloading is now working when you got the upgrade.
Sign In or Register to comment.