Rawshark 11 Posted July 17, 2019 In the mission that I am building I am trying to create a small squad of super-soldiers to go up against my players. I have done a mission like this before in vanilla by just adding this addEventHandler ["HandleDamage",{damage (_this select 0)+((_this select 2)/15)}]; into the init fields of the units in question and it has worked well enough in the past with the AI taking a lot more damage than normal before going down. This time around though I am using ACE and the above script just doesn't seem to work at all. I am fairly sure this might be down to how ACE handles damages but I am not versed enough in scripting to know how to modify (or even re-write) the script so it will play nicely with ACE. I am also aware that in the ACE medical setting I can tinker around with how much damage players and AI can take before going unconscious but that seems to apply a global effect when I only want to apply this to a selection of units. Anyone have any ideas or experience trying to do something similar with ACE? Share this post Link to post Share on other sites
ZaellixA 383 Posted July 17, 2019 Hey there Rawshark. I have to admit that I haven't scripted a lot around ACE so I am not very familiar with its structure, but maybe this github issue will help. It refers to the ACE ace_fnc_handleDamage function. I didn't check exactly how it works but there's a couple of examples in the issue you could check. Additionally, although I am not sure, I believe you could possibly use the same event handler you use but instead of damage use the ace_fnc_handleDamage function. I believe that the said event handler will still trigger so just by interchanging the use of damage with the respectiive ace function should do the trick. 2 Share this post Link to post Share on other sites
sgtmjrprivate 3 Posted April 14, 2021 This has worked for me... "6" is the value, and "this" is the unit you are running the code on. I have used in Eden editor in a units init field and in a script.. I use it because the RHS OPFOR units seem to take way to much damage and my BLUFOR AI will take one shot and die. So I will set ACE Medical Damage Threshold for AI real low (Globally for OPFOR) and then run this on all my BLUFOR AI which will override that setting. this setVariable ["ace_medical_damageThreshold", 6, true] 2 1 Share this post Link to post Share on other sites