_unitarray= _this select 0
_hurt = []
_say = ["eng22","eng23","eng29","eng30","eng31","eng32","eng33","eng34"]
#start
_tmp= (count _unitarray) - 1
?_tmp < 0 : exit
#loop1
_unit = _unitarray select _tmp
? vehicle _unit != _unit : goto "cycle"
? "man" CountType [_unit] == 0 : goto "cycle"
? _unit in _hurt : goto "check"
? getdammage _unit > 0: _hurt = _hurt + [_unit]; goto "speak"
#cycle
~0.05
_tmp = _tmp - 1
?_tmp < 0 : goto "start"
goto "loop1"
#check
? getdammage _unit == 0: _hurt = _hurt - [_unit]
goto "cycle"
#speak
_rand = random 8
_rand = _rand - _rand % 1
_unit say (_say select _rand)
~5
goto "cycle"
so, could i convert that script into a function? its just a pain script - using a list trigger as the array it see's who is hurt and makes them say one of the editor voices, like 'MEDIC!' etc... can that be made into a function?