Search the Community
Showing results for tags 'setHitPointDamage'.
Found 2 results
-
[SOLVED] Copy hitpoints from one object to another
sarogahtyp posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I d like to know if my way to copy the partial damage from one object to another works and if it can be optimized. fnc_get_hp_damage = { params ["_object"]; _hp_all_info = getAllHitPointsDamage _object; [_hp_all_info select 1, _hp_all_info select 2] }; fnc_set_hp_damage = { params ["_object", "_hp_all_info"]; private _hp_selection_names = _hp_all_info select 0; private _hp_damage_values = _hp_all_info select 1; { _object setHitPointDamage [_x, (_hp_damage_values select _forEachIndex)]; } forEach _hp_selection_names; }; params [["_vec_or_unit1", objNull, [objNull]], ["_vec_or_unit2", objNull, [objNull]]]; if ((isNull _vec_or_unit1) or (isNull _vec_or_unit2)) exitWith {true}; _hp_info = _vec_or_unit1 call fnc_get_hp_damage; [_vec_or_unit2, _hp_info] call fnc_set_hp_damage;- 16 replies
-
- getAllHitPointsDamage
- setHitPointDamage
-
(and 2 more)
Tagged with:
-
I've recently used getHit and setHit in a script. But yesterday I discovered getHitPointDamage and setHitPointDamage. From what I read from the wiki page, it looks like they are the same. Except the latter is more precise. Because of the number of hit points (or parts) that hold a damage level. For getHit there are a lot less. Moreover I saw there was getAllHitPointsDamage, which I think will come in handy when I want to learn the different hitPoint names. Why are there two commands, when there can be only one (as far as I know of there use) ? Why would I be using getHit when the other one is more accurate ? C.Coco
- 6 replies
-
- getAllHitPointsDamage
- gethitpointdamage
-
(and 3 more)
Tagged with: