Arma 3
Electromagnetic Pulse DEMO
aqarius90 23. okt. 2019 kl. 11:10
EMP damage expansion
Comments are char limited, so I'm posting here:

I noticed the EMP only damages vehicle engines, and not the lights or other elements. I've been fiddling around, and put together a loop and a list of interesting damage points. I thought it would be useful to put it up somewhere:

in emp_effects.sqf, replace:
_x setHitPointDamage ["hitEngine",1];
with
_veh = _x; { if (_x == "hitengine" || {_x == "hitengine1"} || {_x == "hitengine2"} || {_x == "hitengine3"}|| {_x == "hitavionics"} || {_x == "hitturret"} || {_x == "hitcomturret"} || {_x == "hitcomgun"} || {_x == "hitmissiles"} || {_x == "#hitlight"} || {_x== "#hitlight1"} || {_x=="#hitlight2"} || {_x=="#hitlight3"} || {_x == "hitlightfront"} || {_x == "hitlightback"} || {_x == "hitlightl"} || {_x == "hitlightr"}|| {_x =="#light_hitpoint"} || {_x=="#light_l_hitpoint"} || {_x=="#light_r_hitpoint"} || {_x == "#light_1_hitpoint"} || {_x=="#light_spotlight_hit"} || {_x =="#light_1_hit"} || {_x =="#light_2_hit"} || {_x =="#light_3_hit"} || {_x =="#light_4_hit"} || {_x =="#light_l"} || {_x =="#light_r"} || {_x == "#light_1"} || {_x == "#light_2"} || {_x =="#light_l2"} || {_x =="#light_r2"} || {_x == "#light_l_flare"} || {_x == "#light_r_flare"} || {_x == "#light_l2_flare"} || {_x == "#light_r2_flare"} || {_x =="#gear_f_lights"} || {_x =="#gear_1_light_1_hit"} || {_x == "#gear_1_light_2_hit"} || {_x == "#gear_2_light_1_hit"} || {_x == "#gear_2_light_2_hit"} || {_x == "#gear_3_light_1_hit"} || {_x == "#gear_3_light_2_hit"}|| {_x =="#p svetlo"} || {_x=="#l svetlo"} || {_x == "#wing_left_light"} || {_x == "#wing_right_light"} || {_x == "hitbattery_l"}|| {_x == "hitbattery_r"}|| {_x == "#cam_gunner"}) then { //After the v1.6, the above OR block can be replaced with: // if ( "engine" in _x || {"avionics" in _x} ||{"turret" in _x} || // {"missiles" in _x} || {"light" in _x} || {"svetlo" in _x} || // {"battery" in _x} || {"cam" in _x}) then { _veh setHitIndex [_forEachIndex, 1]; } }foreach (getAllHitPointsDamage _veh select 0);
< >
Viser 1-1 af 1 kommentarer
ALIAScartoons  [udvikler] 21. maj 2020 kl. 8:13 
Very nice, thanks for the input! I will consider this when i will updated the script.
Also commands or functions that have global effect should be considered just to make sure that the damage propagates on clients and server. I don't remember if i used remotexec tho functions like BIS_fnc_setHitPointDamage (as suggested by Lumiere) are global by default, however i will need to test that and do some reading.
< >
Viser 1-1 af 1 kommentarer
Per side: 1530 50