sarogahtyp 1109 Posted March 23, 2016 I wonder if it is possible to get the initial speed of a bullet before shooting it. I think about writing an aiming help for moving targets where a crosshair is drawn at the point that u have to shoot at to get a hit. Share this post Link to post Share on other sites
pedeathtrian 100 Posted March 23, 2016 Check this out: CfgWeapons Config Reference: initSpeed. So if this value is greater than zero, you simply take it. Otherwise you take value from CfgMagazines' subentry's "initSpeed" and multiply it by initSpee's absolute value. Also, take any muzzle attachments into account, e.g. check for getNumber(configfile >> "CfgWeapons" >> "muzzle_snds_H" >> "ItemInfo" >> "MagazineCoef" >> "initSpeed") if you have such attachment and multyply your speed by this parameter. 1 Share this post Link to post Share on other sites
sarogahtyp 1109 Posted March 23, 2016 Thx for ur reply. I will crawl all of that information soon. Another related question came to my mind was about wind. Do we have any wind simulation on bullets implemented in arma 3 or should i use this Bullet-Wind Interaction System in my mission for it? Edit: How can I change name of topic and bound tags in this forum? Share this post Link to post Share on other sites
sarogahtyp 1109 Posted March 24, 2016 thats working great pedeathtrian thank u again. now i ve a few more questions. 1. some weapons initSpeed is equal 0. i think taking magazines init speed is correct then, right? 2. the muzzle i tested had initSpeed 1.05 that means the bullet is faster with it. i thought it should get slower with a muzzle. why is it faster? wrong simulation or wrong thoughts in my mind? 3. is it possible to get bullets negative acceleration value to calculate a better value for its flight time? Share this post Link to post Share on other sites
Greenfist 1863 Posted March 24, 2016 thats working great pedeathtrian thank u again. now i ve a few more questions. 1. some weapons initSpeed is equal 0. i think taking magazines init speed is correct then, right? 2. the muzzle i tested had initSpeed 1.05 that means the bullet is faster with it. i thought it should get slower with a muzzle. why is it faster? wrong simulation or wrong thoughts in my mind? 3. is it possible to get bullets negative acceleration value to calculate a better value for its flight time? I assume that speed increasing muzzle is a suppressor? Then yeah, that's how they often work. 105% may be a little exaggerated though. There's a 'airFriction' value in the ammo configs, but I don't know the formula behind it. Possibly just m/s2. 1 Share this post Link to post Share on other sites
sarogahtyp 1109 Posted March 24, 2016 (edited) There's a 'airFriction' value in the ammo configs, but I don't know the formula behind it. Possibly just m/s2. I dont know but beside arma air frictions unit is usualy Newton. N = kg*m/s² That would mean I could just devide that value by the bullets weight. But I cant find that weight in the config references. Any suggestions about it? EDIT: There is a weight=0 in cfgMagazines but what does it mean? i think i ve to test which values it provides. Edited March 24, 2016 by sarogahtyp Share this post Link to post Share on other sites
Guest Posted March 24, 2016 Can't you get the speed with event Fired ? Share this post Link to post Share on other sites
sarogahtyp 1109 Posted March 24, 2016 Can't you get the speed with event Fired ? no, i need the speeds b3fore fireing the bullet as u can read in my first post. Share this post Link to post Share on other sites
Guest Posted March 24, 2016 And ? You can find speeds in editor before including it in your mission ;) Share this post Link to post Share on other sites
sarogahtyp 1109 Posted March 24, 2016 And ? You can find speeds in editor before including it in your mission ;) for every weapon from every addon combined with every Magazin, ammo and muzzles? I dont think so. Crawling configs is the only way here I think. Share this post Link to post Share on other sites
pedeathtrian 100 Posted March 24, 2016 I dont know but beside arma air frictions unit is usualy Newton. N = kg*m/s² That would mean I could just devide that value by the bullets weight. But I cant find that weight in the config references. Any suggestions about it? CfgAmmo subentries have airFriction, which descriptions looks very much like it's acceleration applied to projectile by air resistance force (so its mass already counted). Not sure about units though. It also could be just coefficient applied to projectile's speed on each simulation step. Share this post Link to post Share on other sites
sarogahtyp 1109 Posted March 25, 2016 I use this to get initSpeed of the weapon: _init_speed_gun = getNumber(configfile >> "CfgWeapons" >> (currentWeapon player) >> "initSpeed"); what is the correct way to do this for the ammo if i want to extract airFriction via cCfgAmmo ? The problem is that i cant find something like currentAmmo player or currentAmmo currentWeapon player Short: How can I access the airFriction value in CfgAmmo ? Share this post Link to post Share on other sites
zapat 56 Posted March 25, 2016 https://community.bistudio.com/wiki/magazinesAmmoFull https://community.bistudio.com/wiki/magazinesAmmo ? Share this post Link to post Share on other sites
sarogahtyp 1109 Posted March 25, 2016 (edited) https://community.bistudio.com/wiki/magazinesAmmoFull https://community.bistudio.com/wiki/magazinesAmmo ? I saw those commands but I dont have a clue how to crawl cfgAmmo with it because it doesnt provide ammos classname. Or should I use the magazine classname for it? like this: _air_fric = getNumber(configfile >> "CfgAmmo" >> (currentMagazine player) >> "airFriction"); cant imagine that this is correct, is it? Edited March 25, 2016 by sarogahtyp Share this post Link to post Share on other sites
zapat 56 Posted March 25, 2016 Seems about right to me... :) But I don't have my PC around to actually test it. Share this post Link to post Share on other sites
sarogahtyp 1109 Posted March 25, 2016 _air_fric = getNumber(configfile >> "CfgAmmo" >> (currentMagazine player) >> "airFriction"); thats not working sadly. I tried isNumber with "airFriction" and "cost" and it returned false. I tried getText with "model" and it returned nothing... any help how to get values from CfgAmmo would be appreciated. Share this post Link to post Share on other sites
pedeathtrian 100 Posted March 25, 2016 CfgMagazines' subentries have ammo. _air_fric = getNumber(configfile >> "CfgAmmo" >> (currentMagazine player) >> "airFriction"); should be _air_fric = getNumber(configFile >> "CfgAmmo" >> getText(configFile >> "CfgMagazines" >> (currentMagazine player) >> "ammo") >> "airFriction"); 1 Share this post Link to post Share on other sites
sarogahtyp 1109 Posted March 25, 2016 that was really enlightened, thank u. Is there any tutorial about those config stuff out? I d like to learn the basics of it cause its essential I think. Share this post Link to post Share on other sites