I am trying to add a condition to an addaction that monitors _x, which in this case is a BIS artillery module
the condition is [_x] call BIS_ARTY_F_Available
which returns a boolean
when testing, this condition is known to be true, but the addaction will not display in the user action list.
When I remove this condition, the addaction displays correctly.
Thus the rest of the code is correct and the implementation of the _x condition is not seen as true
Any ideas how to implement this condition correctly ?
_object = _this select 0;
_caller = _this select 1;
_myBatterys = [];
_id = 0;
_title = "";
{if(side _caller == side (_x call BIS_ARTY_F_BatteryLead))then
{
_myBatterys = _myBatterys + [_x];
_title = format [" Select %1", _x];
_batteryID = call compile format ["Tx_batteryID_%1",_id];
_id = _object addaction [_title, Tx_ActionPath + "Arty\Arty01_selectBattery.sqf", _x , -20 , false , false , "" , "( Tx_DisplayActions) && (alive _target) && (_target getvariable ""Tx_ArtyStage"" == 1)&&([_x] call BIS_ARTY_F_Available)"];
_id = _id + 1;
}
}foreach BIS_ARTY_BATTERYCAT;