Page MenuHomeFeedback Tracker

"HandleDamage" Event Handler with return value of "0" fails to negate damage on air vehicles while in-flight
Closed, ResolvedPublic


Using the below on a helicopter (haven't tested with other aircraft types) while the helicopter is in flight does not negate the non-scripted damage that should be negated when the Event Handler's code returns "0". It does however negate the damage if the helicopter is stationary on the ground.

_unit addEventHandler ["HandleDamage", {0}];

More details can be found here:


Operating System
Windows 10 x64
Operating System Version
Windows 10 Pro x64 v1809
Steps To Reproduce

Execute the following code on a helicopter:

_vehicle addEventHandler ["HandleDamage", {0}];

Crash the helicopter into the ground or shoot a rocket at it while it's in flight.

Additional Information

For reference, this is the script I was trying to write when I found that this issue was present:

this addEventHandler ["handleDamage", {
	_unit = _this select 0;
	_damage = _this select 2;
	_source = _this select 3;
	if (_source == _unit && (damage _unit + _damage) > 0.99) then {
		_unit setDamage 0.99;
	} else {
		_unit setDamage (damage _unit) + _damage;

Event Timeline

Drift_91 created this task.May 25 2019, 7:06 AM
This comment was removed by Dwarden.
This comment was removed by Dwarden.
This comment was removed by Dwarden.
Wulf added a subscriber: Wulf.Feb 24 2020, 11:11 AM

Helicopters in flight are invulnerable. Could someone please confirm this is fixed as well?

@Wulf I'm still able to reproduce the bug with the following mission in hosted MP on dev branch.

This comment was removed by Dwarden.

@Wulf This is still reproducible in the 1.98 update that released yesterday.

I've made the reproduction mission more complex. For some reason it seems damage _helicopter; returns 0 even after it starts loosing power and until the helicopter's been completely destroyed. So I'm assuming it's only allowing the damage through to individual hitpoints.

Wulf added a comment.Apr 15 2020, 10:51 AM

Talked to Design. And my suspicions were confirmed.

Regarding the Damage via collision with an object or ground. There are certain exceptions for Helicopters and Planes in regards to Handle Damage and alas we can't change that I am afraid.

Wulf added a comment.Apr 15 2020, 10:56 AM

Also the Heli and the AI are separate objects meaning you need to use Handle Damage on them separately. If you jsut use the HD on just the heli you can still kill the crew piloting it, meaning it will drop to the ground and crash. Solution is then to make both the heli and the AI piloting it invulnerable then the heli will not crash to the ground.

Wulf closed this task as Resolved.EditedApr 15 2020, 10:57 AM
Wulf claimed this task.

Closing as this most likely won't be changed.

Alright, so I got back around to testing this and I see my mistake about assuming the EH handled the occupants as well. If I disable damage on the crew then shooting the RPG does nothing.

However the vehicle itself should be indestructible with the EH returning 0. If I enter helo_1D setDamage 1; into the debug console the aircraft slowly falls to the ground, and when it hits it explodes.

Realistically, if an aircraft violently burst into flames after firmly bumping into the ground at less than 20KM/h it wouldn't be considered appropriate for even civilian use. I don't understand why it's not possible to script away the explosion. Unless this EH exception on aircraft is intended functionality, I don't see how it could not be possible to fix it. It's almost as if the devs have some sort of vendetta against milsim players being able to have realistic aircraft accidents.