I'm at work, so I'm winging it here, hopefuly someone else can fix whatever little mistakes i make, or test it out.
Make sure every unit you want this ot run on has a name.
Put this in the init:
this exec "thisscript.sqs";
Make a script and put this in it.
#loop
?((getdamage _this) = 0) : goto "loop"
_this setdamage = 0
goto "loop"
exit
This is a loop. 0 is 100% health in OFP, 1 is dead. So if its health is 100%, it keeps looping and checking. If it isn't 100%, it goes to a command that sets the dammage level to 100% (IE fully healed). If this works is I posted (I will check it out later when i get home, unless someone else volunteers), then there are only two questionable issues.
1) If a person is killed with one hit (like a direct hit from a HEAT round), will they die or not? I know for sure if a person is hit and is 99% damaged (0.99 in script terms), it should fully heal them, but dont know about something like a one-shot-kill.
2) It may conflict with some other scripting. IE if a plane is flying and hits a mountain, somewhere in the OFP scripting it is saying "setdamage = 1" to all units inside that plane. So will this little script be able to counter-act another script tellign the unit to die?
This is something I would like to find out myself. Might come in handy to have a god-mode script around for some DM or CTFs.