closedisplay AAN news

closedisplay AAN news

« posted: Jan 20, 2023, 11:21 AM »
I tried to add something special to one of the missions.


Actual, only one problem: after mission is done or failed, the display doesn't disappear.
I tried two different things inside the propaganda mission sqf:

Code: [Select]
call{(uinamespace getvariable "BIS_AAN") closedisplay 1;}
Code: [Select]
[(uiNamespace getVariable "BIS_AAN") closeDisplay 1] remoteexec ["call", -2];
Last one also with "call", 0. But still the displays stays.

Anyone any idea?  :-\

Code: [Select]
_failedExec =
{
// Mission failed
{ deleteVehicle _x } forEach _cashObjects;
deleteVehicle _box1;
[(uiNamespace getVariable "BIS_AAN") closeDisplay 1] remoteexec ["call", 0];
};

// _vehicle is automatically deleted or unlocked in missionProcessor depending on the outcome

_successExec =
{
// Mission complete
_box1 setVariable ["R3F_LOG_disabled", false, true];


// Give the rewards
{
_x setVariable ["cmoney", 500, true];
_x setVariable ["owner", "world", true];
} forEach _cashObjects;

_successHintMessage = "The propaganda has been stopped!";
[(uiNamespace getVariable "BIS_AAN") closeDisplay 1] remoteexec ["call", 0];
};


- solved -