good day! Okey Chops I did everything you told me to do , and yes now I can place the soldier everywhere in the map and tracer effect will now work thats great
however when you change this code: _missile = nearestObject [this,_this select 4] in the original scripts for this one:_missile = nearestObject [sold1,_this select 4] the effect only works with that spesific unit and even if you put more unit with their own names the script refuse to work with them. I try to modify the code by adding more names:_missile = nearestObject [sold1,sold2,sold3_this select 4] but with no luck I got the same error:"_trace setpos [(getpos _missile select 0), (getpos _missile select 1), (getpos _missile select 2)] #error expected number" then I try to put a group loop directly into the script itself:
; ########### DEBUG ###########
;hint "DEBUG: grouploop"
; #############################
_groupselect = _groupselect - 1
; If _groupselect is less than 0 goto start
? _groupselect < 0 : goto "start"
; If all units in selected group is dead remove it from _groups and occupied array and goto start
? count units (_groups select _groupselect) == 0 : _groups = _groups - [(_groups select _groupselect)]; occupied = occupied - [(_groups select _groupselect)]; _groupcount = count _groups;
_missile = nearestObject [sold1,_this select 4]
_trace="LargeRunwayMarkerWhite" createVehicle [0,0,0]
_trace setpos [getpos _missile select 0, getpos _missile select 1, (getpos _missile select 2) +0]
_trace inflame true
#loop
~0.0001
_trace setpos [(getpos _missile select 0), (getpos _missile select 1), (getpos _missile select 2)]
? isNull _missile : goto "end"
goto "loop"
#end
deleteVehicle _trace
exit
PS. you know this is for the whitelarge effect but you can do this with the other scripts as well.
---------------------------------------------------------------------------------------------
and then I got something interesting I was able to add units like:sold2 addEventHandler [""fired"",{sold2 exec ""tracerYellow.sqs""}];sold3 addEventHandler [""fired"",{sold3 exec ""tracerYellow.sqs""}] and they where able to call the script with no errors but they have to be in the same group of "sold1" in order to work or near to "sold1".and another little bug is that east units always refuse to call the script even if you use another color scritp only for them using the same logic;because this is where the problem lives:_missile = nearestObject [sold1,_this select 4] because you can have to names like:I[sold1,east1_this select 4] without messing everything up.
I dont have a clue how to fix it but at least we did some improvements what we need is to somehow find a way to call the scripts by using triggers that will cover the whole mission I know that we will need eventhandlers anyway because the script is call by the event"fired" but if we can avoid eventhandler the better but you will have to rewrite the whole scripts to find another way around. Well i have to go test the scripts and try to make it work in the whole map and using a lot of units for the west and for the east see you next time