Jump to content

Recommended Posts

Sup everyone. I'm working with a code snippet for fast reload (an old idea that never finished). The concept is to reload the current weapon, dropping the magazine to the ground and cutting the required time to reload to half (I'm a IPSC shooter IRL, so grabbed the concept from there).

So far, i've achieve this:

 

1. Get magazine type and ammo count for current weapon.

2. Remove the magazine from current weapon.

3. Create a magazine of the same type and ammo count on the floor.

4. Insert a magazine from inventory to current weapon.

 

Extra: using ACE, binded the action to double R key tap.

 

The thing is that I cannot control the animation speed. I mean, I want to start the reload animation but at a faster speed; in fact, i need any animation to replace the standar one.

Any advice is welcome.

 

Thanks in advance!

  • Like 1

Share this post


Link to post
Share on other sites

I second this. Would be pretty cool.

Share this post


Link to post
Share on other sites

Normally you'd be able to control an animation's speed with setAnimSpeedCoef, but reload animations are considered gestures/actions, so that command does not affect their speed. You'd probably need to create a new gesture or modify an existing one via an addon. However, you could likely find an existing regular animation that looks good enough and use that instead with the aforementioned command, resetting the animation speed after the reload is done (important since you don't want your character zooming around with super speed).

  • Like 3

Share this post


Link to post
Share on other sites

As you have probably already found out, I tried both of these techniques, and neither has any effect on the speed of the reload animation:

player setSkill ["reloadSpeed", 1];
player setAnimSpeedCoef 2;

Sadly it looks impossible unless you mod your own reload animation.

  • Like 2

Share this post


Link to post
Share on other sites

There is the default Arma 2 style reload animation which you could use with:

player playAction "ReloadMagazine"

I think it's slightly faster than regular animations, so it's a start I guess.

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, johnnyboy said:

As you have probably already found out, I tried both of these techniques, and neither has any effect on the speed of the reload animation:


player setSkill ["reloadSpeed", 1];
player setAnimSpeedCoef 2;

Sadly it looks impossible unless you mod your own reload animation.

Yep, already went to that obscure corners... setSkill only affects AI, and setAnimSpeedCoef works for movement-like animations.

 

Thanks anyway, @johnnyboy

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, alpha993 said:

There is the default Arma 2 style reload animation which you could use with:


player playAction "ReloadMagazine"

I think it's slightly faster than regular animations, so it's a start I guess.

Thanks @alpha993, will try that. In an early reply, you've mentioned something about other gestures, and/or modifying existing ones (via config, i suppouse). Do you have an example or link to something like that?

 

Thanks!

  • Like 1

Share this post


Link to post
Share on other sites

Total stab in the dark here (I don't really know that much about how the animations system in the game works), but this might be useful to you.
I would personally recommend using this is a rough guide to help look for the actual MX reload gesture in the game files and work from there.
 

class CfgGesturesMale
{
 class ManActions;
 class Actions;
 class Default;
 class States
 {
  class myGestureName: Default
  {
   file = "a3\anims_f\data\anim\sdr\gst\gesturereloadmx.rtm"; // <---- Existing anim that might look good for dropping a mag. MX one for reference.
   looped = 0;
   speed = 0.8; // <---- Variable to speed it up however you like! For reference, MX speed is 0.37.
   duty = 1;
   aimingBody = "aimingUpDefault";
   mask = "handsWeapon";
   soundOverride = "";
   leftHandIKBeg = 1;
   leftHandIKCurve[] = {1};
   leftHandIKEnd = 0;
   rightHandIKBeg = 1;
   rightHandIKCurve[] = {};
   rightHandIKEnd = 1;
   weaponIK = 0;
   enableOptics = 0;
   showWeaponAim = 1;
   disableWeapons = 1;
   disableWeaponsLong = 1;
   canPullTrigger = 0;
  };
};

 

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×