Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
roguetrooper

Immune to falling damage?

Recommended Posts

Is there a way to make a unit immune to falling damage (ONLY to falling damage)? So that no damage at all is applied to the unit by jumping from a great height. "Allowdamage" is not sufficient, the unit shall be woundable by bullets while falling/landing.

I've played around with addeventhandler "HandleDamage", but I just don't get it.

Share this post


Link to post
Share on other sites

Try putting this code in your units' initializations;

this addEventHandler ["HandleDamage", {if ((_this select 4) == "") then {0} else {_this select 2};}];

HandleDamage comes with five parameters. The third one is the damage that would be dealt, and the fifth one is the source of the damage. If the source is falling damage, then the source will be an empty string. So we test for that. If so, then we return 0 as the damage dealt; otherwise we return the normal amount of damage that would have been dealt.

Edited by Maurdekye

Share this post


Link to post
Share on other sites

Does anyone know if damage caused by nearby explosions also results in souce of damage (_this select 4) == ""?

Share this post


Link to post
Share on other sites

You could just test to see;

this addEventHandler ["HandleDamage", {hint (_this select 4);}];

Share this post


Link to post
Share on other sites

Sure it does, the point of the addon, is the ability to drop from certain heights without taking damage, and at the same time there would be an animation.

In vanilla Arma3, if you jumped off a balcony that was 1/2 story up you'd probably die, or take severe damage, this addon allows you to not take damage, and as said plays

an animation like you will land on your feet.

Its just an idea, or suggestion, the other option here is to open it and see how its scripted, after testing what it does, again just ideas.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×