Jump to content
Sign in to follow this  
Coding

unit returned by loadAbs

Recommended Posts

I am sorry and apologize! This is a doublepost of a Armaholicthread.

But I really need to know what unit the loadAbs function returns! Values returned are around 400-700. I am also interested what load returns. Percentage?

Hope someone replies...

Sorry and thank you.

Share this post


Link to post
Share on other sites

It's "mass" I guess? Does it really matter? It's a number, do what you will with said number.

Share this post


Link to post
Share on other sites

Yes it does matter! I need a to set the players weight and its load in a relation and since there is no loadUnit function I use the value 68kg. (average height googled and using perfect bmi on it).

I am using it to calculate thirst/hunger for a unit and heavy weight units shall gain thirst faster than light units.

		_playerWeight = 68;
	_weight = _playerWeight + (loadAbs _player);
	_rate = 1 + (_playerWeight/_weight)*((speed _player)/10)*((speed _player)/10);

loadAbs blufor sniper: 496

loadAbs blufor sniper without rifle: 346

m320 = m200 weights 14kg

346+10*14~496

may this be truth?

_weight = _playerWeight + (loadAbs _player)/10;

can anyone confirm this with other equipement?

Edited by Coding

Share this post


Link to post
Share on other sites

My point is that it doesn't matter if it's 68 kilograms or 68 pounds or 68 stones or 68 wozzlehosists, it's still just a number and as long as every where you use that number it's calculated the same way it doesn't matter what units it's in.

The game says a sniper has 496 "load". Doesn't matter if that's 496 kg or 496 bushels. If you drop a mag for his sniper rifle his load goes down by 9. If you take off the scope it goes down by 10. If you drop the rifle it goes down by 150. Take off his uniform and it goes down by 100. Take all units off and it's 0 "loadabs". So loadabs is gonna give you a number from 0 to whatever (500 being a fully loaded sniper while 612 being a fully loaded AR ammo man or 240 for an Officer) that you can use to determine how "heavy" someone's load is.

The real problem is that load, a command that's supposed to give you the sum of mass of items in containers, returns some ridiculous 0.xxxxx number (officer is 240 loadabs but 0.157791 load, the hell?). So just always use loadabs and don't sweat what units it's in just that it's a number. :)

Share this post


Link to post
Share on other sites

Mhh...

That is weird!

btw I made a mistake:

(_weight/_playerWeight)

Share this post


Link to post
Share on other sites

I agree with kaylania that its all relative, as long as you treat everything the same in your calculations is does not really matter.

If i had to guess though looking at the figures i would say its newtons, this would most likely tie in quite nicely with the physics engine.

50kg * 9.82 gravity = 491 newtons

Although 50kg is alot of weight i have no idea but i thought an average kit was something like 50-100lbs at most, so 22-45kg. +50kg for a sniper sounds a little on the heavy side :D

Edited by Larrow

Share this post


Link to post
Share on other sites

Using loadabs a fully loaded sniper is 496. A naked sniper is 0. So the actual body weight of the unit isn't part of any of that number.

Share this post


Link to post
Share on other sites

Yes and that is the problem! I need the weight of the unit (relative, can be 600 or so, I dont care) OR I use an average unitweight and need the real weight of the units equipement

Share this post


Link to post
Share on other sites

The measurement is a hybrid volume/weight unit, not simply weight:

c) the parameter you are referring to is called "mass" and it is a combined factor of weight AND size (a light but unwieldy A0 cardbox will have a big mass in game, similarly small, but heavy ball of lead).

Source

Share this post


Link to post
Share on other sites

The mass of most units can be found in config files. You can get that in-game semi-dynamically by mixing getNumber. Likewise, I put in a request for a getMass command: http://feedback.arma3.com/view.php?id=12250.

Also, sometimes hard units do matter. For example, many physical constants have SI units base/derived units in them, so using say, grams instead of kilograms will set you off by a factor of 1000.

Share this post


Link to post
Share on other sites

You can fetch the mass value also from configs.

Share this post


Link to post
Share on other sites

Thanks for the replies.

getMass would be interesting!

but atm I noticed most objects have weight = 0 and the rifles have no mass...

Share this post


Link to post
Share on other sites

When I dropped the M320 the loadAbs value went down by 150. More if I left the scope on and clip in.

You can "getMass" via:

_myWeaponMass = getNumber (configfile >> "CfgWeapons" >> primaryWeapon player >> "WeaponSlotsInfo" >> "mass"); 
hint format["My weapon's mass is %1", _myWeaponMass];

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
Sign in to follow this  

×