Forum Jump :

Author Message


Posts: 5
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2018-05-16 14:09        
     
I wonder if anyone can tell me syntax I should look for in the weapons.cfg to work out the reload time of a weapon (specifically infantry weapons) ? Or where to find the variables that affect the reload time etc.

I've done a search and there doesn't seem to be any info. especially when a lot of weapons say 0 in the weapons.cfg - so I guess it's tied to the reload animation?

Is there anywhere to find the times of those? Or if some scripting god can explain what variables, in which files I need to look at to do the calculations?


Author Message

HazJ  



Posts: 165
Rank:


Level: Member

Country: uk
Location: [0, 0, 1000]
Occupation: Full Stack Developer
Age: 23
In-game name: Haz

 
#2 Posted at 2018-06-23 04:58        
     
Yes. Examples:
getNumber (configFile >> "CfgWeapons" >> "arifle_AKM_F" >> "reloadTime")
getNumber (configFile >> "CfgWeapons" >> typeOf primaryWeapon player >> "reloadTime");
You can also set the reload time to your own liking however, I don't believe there is an engine solution to return it so if you do change it to a custom value, the above method won't return the change. You'd have to store it manually somewhere.
https://community.bistudio.com/wiki/setWeaponReloadingTime

Haz