to get the dammage opf a unit you do this:
getdammage unitName
To make it a condition for the medic going to the hurt unit use this:
?(getDammage unitName) > 0.7 : goto"healUnitName"
healUnitName wil be where the medic goes to the injured soldier.
Try the following script:
_medic = _this select 0
; The damage the medic wll heal a wounded unit at
_dammage = _this select 1
; units medic will heal
_unit1 = _this select 2
_unit2 = _this select 3
#main
?(getDammage _unit1) > _dammage : goto"unit1hurt"
?(getDammage _unit1) > _dammage : goto"unit2hurt"
goto"main"
; Medic heals unit2 if not dead, would be better to make as another script
#unit2hurt
; Goes to medic doesn't heal if unit's dead
?(getDammage _unit2 >= 1 : goto "dead"
_unit2 stop true
_medic doMove getPos _unit2
@(_medic distance _unit2 ) <= 2
; not sure if anims right, check in Lusty Pooh's comref
medic switchMove"combatToMedic"
~1
_unit2 setDammage 0
_unit2 stop false
goto"main"
#dead
; dont know pick up anim
_medic playmove
goto"main"
I think this will work, you'll have to ad different areas for each unit. It would be beter to make another script though. After the getdammage line under #mainexecute the other script with the one variable, the unit's local variable defined at the top of the script. Copy everything between #unit1hurt and goto "main" (not including those lines) and everything under and including #dead, replacegot "main" with exit though.