_Actor = _this select 0
_Centre = _this select 1
_area = _this select 2
_freq = _this select 3
_rounds = _this select 4

_ActorPos = GetPos _Actor
_oldx = _ActorPos select 0
_oldy = _ActorPos select 1
_oldz = _ActorPos select 2

_CentrePos = GetMarkerPos _Centre
_cx = _CentrePos select 0
_cy = _CentrePos select 1

_areaX2 = _area * 2

#Update
_rounds = _rounds - 1
_Actor SetPos [_cx + Random(_areaX2) - _area,_cy + Random(_areaX2) - _area, 0]
_Actor SetDammage 1
~0.01
_Actor SetPos [_oldx,_oldy,_oldz]
_Actor SetDammage 0
~_freq
? (_rounds > 0) : goto "Update"
exit