roguetrooper 2 Posted August 25, 2014 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
Maurdekye 10 Posted August 25, 2014 (edited) 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 August 25, 2014 by Maurdekye Share this post Link to post Share on other sites
roguetrooper 2 Posted August 25, 2014 Thank you, it works perfectly. Share this post Link to post Share on other sites
Maurdekye 10 Posted August 25, 2014 I'm glad; it was completely untested on my part. Share this post Link to post Share on other sites
BEAKSBY 11 Posted August 25, 2014 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
Maurdekye 10 Posted August 25, 2014 You could just test to see; this addEventHandler ["HandleDamage", {hint (_this select 4);}]; Share this post Link to post Share on other sites
Gunter Severloh 4087 Posted August 26, 2014 Theres also this: http://www.armaholic.com/page.php?id=24696 Share this post Link to post Share on other sites
Maurdekye 10 Posted August 26, 2014 That has nothing to do with the post. Share this post Link to post Share on other sites
Gunter Severloh 4087 Posted August 26, 2014 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