unshadow56 10 Posted June 14, 2017 I want to randomize the damage on a car on the start of a mission, same thing with a tank and helicopter and so on. What are the codes for each part and how do I make it random? Is there some place to reference each part of a car/tank/helicopter like a website I could use? Share this post Link to post Share on other sites
sarogahtyp 1109 Posted June 14, 2017 You can get the damage and the part name of each hitpoint for an object with: getAllHitPointsDamage You can set a specifics hitpoint's damage with: setHitPointDamage A solution for ur problem could be this: Saro_fnc_randomDamage = { //get passed object and check if it is an object. If it is no object then initialize with objNull. params [["_obj", objNull, [objNull]]]; if (isNull _obj) exitWith {hint "No object passed"; true}; private _names = (getAllHitPointsDamage _obj)select 0; //set random damage for each hitpoint part { _obj setHitPointDamage [_x, random 1]; true } count _names; true }; [YourCarsName] call Saro_fnc_randomDamage; [YourHelisName] call Saro_fnc_randomDamage; [YourTanksName] call Saro_fnc_randomDamage; [YourAndsoonsName] call Saro_fnc_randomDamage; Share this post Link to post Share on other sites
barbolani 198 Posted June 14, 2017 Or the easy, dirty and lazy, but maybe good enough: vehicleName setDamage (random 1); Share this post Link to post Share on other sites
sarogahtyp 1109 Posted June 14, 2017 29 minutes ago, barbolani said: Or the easy, dirty and lazy, but maybe good enough: vehicleName setDamage (random 1); 3 hours ago, unshadow56 said: I want to randomize the damage on a car on the start of a mission, same thing with a tank and helicopter and so on. What are the codes for each part and how do I make it random? Is there some place to reference each part of a car/tank/helicopter like a website I could use? @barbolani As I understand ops request ur lazy method is no solution for it. Share this post Link to post Share on other sites
barbolani 198 Posted June 14, 2017 I made lazy Reading, same as my code :) Share this post Link to post Share on other sites