this is covered in a topic below... :-\ this was Bremmer's solution
;activate with [unitname] exec "surrender5.sqs"
_unit = _this select 0
_unit switchmove "FXStandSurUniv"
;this stops multiple scripts running concurrently
~(random 1)
#loop
;adjust the delay to eliminate lag
_unit switchmove "FXStandSurUniv"
~0.3
? not alive _unit : _unit switchmove "FXStandSurDead"; exit
goto "loop"