_obj = _this

_ary = GetHitpointsNames _obj

#1
_hitpoint = (_ary select (random ((count _ary)-0.5)))
_obj SetSelectionDammage [_hitpoint, 0.8]
?(player distance _obj) < 10: showdebug [format ["DEBUG (showDebug [String, Time (ms)]) 'SetSelectionDammage': %1 (hitpoint name) | %2 (GetSelectionDammage) | 'GetMass': %3", _hitpoint, _obj GetSelectionDammage _hitpoint, getmass _obj], 6000]
?!(isnull (nearestobjectdistance [_obj, "camera", 10])): showdebug [format ["DEBUG (showDebug [String, Time (ms)]) 'SetSelectionDammage': %1 (hitpoint name) | %2 (GetSelectionDammage) | 'GetMass': %3", _hitpoint, _obj GetSelectionDammage _hitpoint, getmass _obj], 6000]
~1
_obj SetSelectionDammage [_hitpoint, 0]
?(player distance _obj) < 10: showdebug [format ["DEBUG (showDebug [String, Time (ms)]) 'SetSelectionDammage': %1 (hitpoint name) | %2 (GetSelectionDammage) | 'GetMass': %3", _hitpoint, _obj GetSelectionDammage _hitpoint, getmass _obj], 6000]
?!(isnull (nearestobjectdistance [_obj, "camera", 10])): showdebug [format ["DEBUG (showDebug [String, Time (ms)]) 'SetSelectionDammage': %1 (hitpoint name) | %2 (GetSelectionDammage) | 'GetMass': %3", _hitpoint, _obj GetSelectionDammage _hitpoint, getmass _obj], 6000]
~1
goto "1"