Friday, September 20, 2024 12:04:10 AM
> settings

Customize


Authenticate

> ExileClient_marxet_util_vehicle_getOverallDamage.sqf
/*
    MarXet v2.0
    Written by WolfkillArcadia
    CC BY-NC-SA 4.0
*/
 
private["_overallDamage", "_count", "_hitpoints", "_damages"];
_overallDamage = 0;
_count = 0;
_hitpoints = _this select 0;
_damages = _this select 2;
{
	if (
		(_x find "wheel") > -1
		|| (_x find "fuel") > -1
		|| (_x find "hull") > -1
		|| (_x find "body") > -1
		|| (_x find "engine") > -1
	) then 
	{
		_overallDamage = _overallDamage + (_damages select _forEachIndex);
		_count = _count + 1;
	};
}
forEach _hitpoints;
_overallDamage / _count
All opinions represented herein are my own
- © 2024 itsthedevman
- build 3c15a1b