i dont know why, but by setting a large negative value on the setdamage, initally this makes the unit resistant to almost anything but explossions, however, once the unit is hit, the damage is set to 0 (again, i dont know why). however by looping the negative value, this effectively makes the unit godmode.
about the paramaters, if you talking about making it customisable for the user, this is still only a beta test, i would very much like to be able to turn this into an addon, but my scripting skills still need improvements. however, this suits the needs for my missions, but it can always be changed at any time.