Jump to content
jstibbsy

Decrease reload time

Recommended Posts

Hey
Would there be a way to decrease reload time (even if it means speeding up the animation.) I've searched but haven't found anything.

Share this post


Link to post
Share on other sites
Hey
Would there be a way to decrease reload time (even if it means speeding up the animation.) I've searched but haven't found anything.
AI has a skill for it - use setSkill
For players u ve to speed up animation with something like setAnimCoef - just google for it or use wikis all commands page

sent from mobile using Tapatalk

Share this post


Link to post
Share on other sites

That speeds up all animations like walking. I want only reload. I'll dig around a bit more.

Share this post


Link to post
Share on other sites

Just track if reload key is pressed and speed up animation for a specific amount of time

sent from mobile using Tapatalk

Share this post


Link to post
Share on other sites

It doesn't work with reloading I found. It keeps reloading same speed but makes player move faster. 

  • Like 2

Share this post


Link to post
Share on other sites

setWeaponReloadTime affects the rechambering, not reload animation (so you can discharge a mag in 0.5 seconds etc, but you will still reload at normal rate).  

 

Plus the setAnimSpeedCoef command does not affect the reload animation time, as it is a gesture, not an animation.  All it does is make the character walk faster but you still reload at the same rate (as said above) :/

 

I tried both but neither are good - can't think of any way to change this by script.  Config is the way to go here I think, unless anyone knows better.

  • Like 3

Share this post


Link to post
Share on other sites

Would there be a way to get rid of reload completely and just have the ammo in the player's inventory decreased as it's shot in a mag? (something like infinite ammo in the gun and it takes one bullet everyshot from a mag in the inventory. Then when the player reaches his final mag, remove infinite ammo.)

Share this post


Link to post
Share on other sites
1 hour ago, jstibbsy said:

Would there be a way to get rid of reload completely and just have the ammo in the player's inventory decreased as it's shot in a mag? (something like infinite ammo in the gun and it takes one bullet everyshot from a mag in the inventory. Then when the player reaches his final mag, remove infinite ammo.)

 

Of course.

 

 

Depleting ammo from inventory first, with total ammo being treated as a single magazine:


player addEventHandler ["Fired",{

	params ["_unit","_weapon","_muzzle","_mode","_ammo","_magazine"];

	if (count (magazinesAmmoFull _unit select {_x select 0 isEqualTo _magazine}) > 1) then {

		_totalMags = magazinesAmmoFull _unit select {_x select 0 isEqualTo _magazine};

		_totalAmmo = 0;
		_totalMags apply {_totalAmmo = _totalAmmo + (_x select 1)};

		systemchat format ["Rounds left in all magazines: %1",_totalAmmo];

		_magAmmoCount = _totalMags select 0 select 1;
		_magStorage = _totalMags select 0 select 4;
		_magAmmo = _magAmmoCount - 1;

		_unit removeMagazine _magazine;

		if (_magAmmo > 0) then {

			_unit addMagazine [_magazine, _magAmmo];

		};

		_maxMagAmmoCount = getNumber (configfile >> "CfgMagazines" >> _magazine >> "count");

		_unit setAmmo [_weapon,_maxMagAmmoCount];

	};

}];

 

Cheers

  • Like 3

Share this post


Link to post
Share on other sites
2 minutes ago, jstibbsy said:

Ahh perfect. That'll do wonderfully.

 

You're welcome.

 

17 hours ago, das attorney said:

setWeaponReloadTime affects the rechambering, not reload animation (so you can discharge a mag in 0.5 seconds etc, but you will still reload at normal rate). 

 

BI naming strikes again!

 

Cheers

  • 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

×