It's a modified FlareTrap.sqs from Chris's Script Editor. I've tried to make it loop through all west soldiers in the area and spawn a flare above them. It works but spews back an error and I can't stand things not working 100% so here I am.
The error is " _flare = _type CamCreate _posFlare" l#l error type any, expected number.
The trigger is "west detected by east, repeatedly"
This is the script:
; Get the parameters given
_trigger = _this Select 0
_color = _this Select 1
_height = _this Select 2
; Find targets to light up
_targetList = List _trigger
_numTargets = Count _targetList
_targetNum = 0
; Get the position of the targets
#List
?(_targetNum > _numTargets): Goto "Exit"
_postarget = GetPos (_targetList Select _targetNum)
; Create the position for the flare to drop (Z + 150 m)
_x = _posTarget Select 0
_y = _posTarget Select 1
_z = (_posTarget Select 2) + _height
_posFlare = [_x, _y, _z]
_targetNum = _targetNum + 1
; Create the flare
?(_color == "WHITE"): _color = ""
_type = "Flare" + _color
_flare = _type CamCreate _posFlare
CamDestroy _flare
Goto "List"
#Exit
Exit
;***********