Hello, Triggerhappy helped me make this script but he had to go on vacation so cant help fix the errors.
It is suposed to use a trigger to detect the player and the script finds out which group detected him, and then a flare shoots up over the the group that detected the player and 2 or 3 support groups from a support array come the assist in hunting down the player.
;array for grup leaders of the detecting group
_aleaders=[(agl1),(agl2),(agl3)]
;array for available supporting groups
_support=[supg1,supg2,supg3,supg4]
;finds what group detected the player
_mindis = 999999
"?_x distance player < _mindis:_mindis = _x distance player;_x = _closest" foreach _aleaders
_flarepos = getpos _closest
;sends up a flare over the detecting group
_flare="Flare"camcreate [getpos _closest select 0, getpos _closest select 2, (getpos _closest select 2)+10]
_flare setvelocity[0,0,50]
;chooses 2-3 random groups out of support and sends them over to the flare position
_r = (random 1) + 2.5
_r = _r - (_r mod 1)
#loop
_r = _r - 1
_c = (count _support)
_i = (random _c)
_i = _i - (_i mod 1)
_grp = _support select _i
_grp move flareposition
_support = _support - [_grp]
?_r = 0:exit
goto "loop"
does anybody see anything that could be causing an error.
thanks