Script to monitor vehicle hitpoint damage in real time
How to use
Where should I hit the vehicle? Does shooting grenades at it help? I saw the texture change but what’s really happening?
I put together a script to quickly execute with the debug console and display the damage to each hit-point in real time. I used this to learn how to efficiently disable certain vehicles in PVP, but it works for every vehicle and unit I’ve tested it with.
Instructions:
1) Load into the editor or wherever you have debug permissions.
2) Aim your weapon at a vehicle.
3) Access the debug console.
4) Paste the script in the debug console and local exec.
The script will continuously run until the vehicle or unit has been deleted or destroyed.
The Goods
_vic = cursorObject //vehicle to test hitpoints ; terminate real_vicwatch; real_vicwatch = [_vic] spawn{ params ["_vic"]; while{alive _vic} do { sleep 0.2; _displayPoints = []; _hintList = []; _hitPointsDamage = getAllHitPointsDamage _vic; _hitpoints = _hitPointsDamage select 0; _damaged = _hitPointsDamage select 2; { _toPercent = [format ["%1%", _x*100 toFixed 1]]; _toPercent pushBack "%"; _toPercent = _toPercent joinString ""; _damaged set [_foreachindex, _toPercent]; } foreach _damaged; _pointsNumber = (count _damaged) - 1; { _displaypoints set [_forEachIndex, format ["%1: %2",_x, _damaged select _forEachIndex]]; //create array of strings in "hitpoint: damage" format } forEach _hitpoints; for "_i" from 0 to _pointsNumber + 2 do { _hintlist pushBack _i; }; _hintlistString = _hintlist joinstring "\n %"; //line breaks and format notation _hintlistString = _hintlistString select [4]; //remove 0\n _hintlistStringFormat = [_hintlistString]; //creates array to add hintSilent parameters for "_i" from 0 to (count _displaypoints - 1) do { _hintlistStringFormat pushback (_displaypoints select _i); //assembles hitpoint strings with hint formatting }; hintSilent format _hintlistStringFormat;//displaypoints select n+1, displaypoints select n+2 }; };
Note
This script is pretty niche and I’m mostly posting it for my own future reference, but let me know if you find a use for it or if there’s a way to better optimize it.
Thanks,
Real Artisan Foods
Hope you enjoy the post for Arma 3 Vehicle Damage Monitor Script, If you think we should update the post or something is wrong please let us know via comment and we will fix it how fast as possible! Thank you and have a great day!
- Check All Arma 3 Posts List
Leave a Reply