Im trying to make a script which spawns invisible targets on known enemies, so you can get an SLX style suppressing fire on possible enemy position, however I have come across 2 problems.
1 is the fact that it refuses to accept the name of an array as an arguament.
The second is that although the global chat telling me a target has been spawned, it doesnt. Ive tried it spawning other things, like M1s and it works, but even trying to spawn enemy targets on them to see wether it has spawned and it doesnt work. Please help!
;[who, east_units]exec "targetspawn.sqs"
_who = _this select 0
_enemy = _this select 1
#start
? (!(alive _who)) then exit
_list = [_who,_enemy, true] call knownUnits
;_who GlobalChat format ["close: %1", east_units]
~1
_pos = (getpos (_list select 0))
_side = side (_list select 0)
? (_side == west): goto "west"
? (_side == east): goto "east"
? (_side == Resistance): goto "res"
~1
goto "start"
#east
"FOX2_E_M_HI_IT" CamCreate _pos
_who GlobalChat format ["east target spawned %1", _pos]
~5
goto "start"
#res
"FOX2_G_M_HI_IT" CamCreate _pos
_who GlobalChat "res target spawned"
~5
goto "start"
#west
"FOX2_W_M_HI_IT" CamCreate _pos
_who GlobalChat "west target spawned"
~5
goto "start"
Here is the script, and for ease of use I have it spawning only on the nearest known enemy.