_Grunt = _this select 0
_Leader = _this select 1
_maxdist = _this select 2
_freq = _this select 3
_vektor = _this select 4
_script = _this select 5

#Update
~_freq
; Check weather the _Grunt is close enough to the _Leader
? (_Grunt Distance _Leader) <= _maxdist : goto "Update"

; call the script and exit
_vektor exec _script
exit