here's a simple 'scan horizon' script.
call using [unit_name, time_to_watch] exec "scan_horiz.sqs"
;scan horizon script
scan_horiz = true
_who = _this select 0
_x = getpos _who select 0
_y = getpos _who select 1
_dir = getdir _who
_dur = _this select 1
_ang = 30
#loop
?not (scan_horiz) : exit
_who setdir (_dir+_ang)
_who dowatch [_x + (100*sin(_dir+_ang)), _y + (100*cos(_dir+_ang))]
~_dur
_dir = _dir + _ang
goto "loop"
you need to define the variable 'scan_horiz' in the init file. when you want the unit to stop scanning the horizon, set 'scan_horiz' to false.