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]