Hi this is my problem.
The problem is present even in SP, but the script needs to work in MP, therefore posted here.
I have an eventhandler that works. I have tested it with triggers. It is the "receiving" script that fails or the transfer of the array in the eventhandler.
End of lines in eventhandler:
_searcherside = getNumber (configFile >> "CfgVehicles" >> typeOf _x >> "side");
call compile format ["LAGGY_BodySide%1 = true", _deadguyside];
call compile format ["LAGGY_FinderSide%1 = true", _searcherside];
LAGGY_BodyAndFinderCombo = [format ["LAGGY_BodySide%1,LAGGY_FinderSide%2", _deadguyside,_searcherside]];
publicVariable "LAGGY_BodyAndFinderCombo";
According to my testing with triggers it works, but the following "receiving" script doesn't:
if (LAGGY_BodySide0 in LAGGY_BodyAndFinderCombo AND LAGGY_FinderSide0 in LAGGY_BodyAndFinderCombo) then
{
hint "An OPFOR body was found by OPFOR";
};
This last script has multiples of the same lines checking for different combinations, but I thought that would be unnecessary to show, since the lines have the same structure.
The problem is that I never get the hints from the receiving script, so the mistake should be in one of the above examples. My variables are either transferred wrong or received wrong.
IMPORTANT NOTE: I get NO error messages.
If my solution is all messed up, my wish is to send two variables in a "package" or array from the eventhandler.
I then want the recieving script to read the COMBINATION of the variables that come in that "package".
Laggy