OK, maybe u could help me with this instead. I want civvies to get all bloody but still take at least a few shots(prefably more than normal amount of shots)so I use SnYpir's tough units script. The problem is that when I do not use this resurection you can turn on/off the civvies die even faster than if they had been setdammaged to 0 but when I use the resurection the civvies sometimes just stop where they should not stop and just look out in the dark. You see what I mean? Here's SnYpir's script with some small changes.
;--------------
;BEGIN SCRIPT
;--------------
;-----begin the parts that u can edit-----
; this variable is the amount of time between loops (should be < 1)
; ARMSTY COMMENT: Here I changed from 0.5 to this value cause it looked ugly if I didn't.
_pause = 0.0001
; get the damageFactor (set to be 2nd script parameter as default)
_damageFactor = _this select 1
; if this equals true the soldier will die as soon as damage equals 1
; (rather than being brought back to life several times before death)
; default is false
; ARMSTY COMMENT: If I turn this true they die too fast, if I turn it false they get that error I talked about.
_noResurrection = false
;-----end the parts that u can edit - change code byond here at own risk!-----
; get the name of the object for this script
; (from script parameter)
_dude = _this select 0
; make sure dude is not dead
; ARMSTY COMMENT: Here I changed both values to 0.8 so they are covered with blood.
_dude SetDammage 0.8
_damage = 0.8
#loop1
; you could put some sort of exit condition here,
;perhaps the player acheives some objective or a global
;variable flips (saves script running when its not needed)
; ? exitCondition : goto "end"
; this will simulate one shot, one kill if damage is made greater
; than one for some reason (big explosion, head shot)
? NOT(alive _dude) AND _noResurrection : goto "end"
; test to see if damage has been taken
? _damage != (GetDammage _dude) : goto "takedamage"
; exit condition for if the dude is dead
? NOT(alive _dude) : goto "end"
#damagedone
; pause for a bit of time
~_pause
; loop again
goto "loop1"
#takedamage
; how much damage has been taken since last damage
_damagetotake = (GetDammage _dude) - _damage
; lessen damage to take
_damagetotake = _damagetotake / _damageFactor
; assign the new damage
_dude setdammage ( _damage + _damagetotake )
_damage = GetDammage _dude
;uncomment if u want to know the damage of the dude after being
;shot
;hint format ["%1",GetDammage _dude]
goto "damagedone"
#end
;--------------
;END SCRIPT
;--------------
Cheers.