Message boxes can be force-closed with:
uiNamespace setVariable ["BIS_fnc_guiMessage_status", false];
Also available as Markdown and JSON, or read the original wiki page.
Displays an interactive message dialog in the center of the screen.
Important
This function internally utilizes suspension (waitUntil to be specific) and therefore has to be executed in a scheduled environment.
[message, header, okButton, cancelButton, parent, useParentBox, pause] call BIS_fnc_guiMessage
Parameters:
message: String or Structured Text - (Optional, default: "") messageheader: String - (Optional, default: "") header textcancelButton: Boolean or String - (Optional, default false):
parent: Display - (Optional, default: [] call BIS_fnc_displayMission) parent displayuseParentBox: Boolean - (Optional, default: false) try to use control inherited from "RscMessageBox" in parent instead of creating a new onepause: Boolean - (Optional, default: true) pause simulation while message dialog is open (no effect in multiplayer)Returns: Boolean - true if the "OK" button was pressed, otherwise false. Returned only after the message box is closed.
Because this example uses spawn, the return value of BIS_fnc_guiMessage is lost and can not be used.
["Hello World"] spawn BIS_fnc_guiMessage;
private _result = ["Are you sure?", "Confirm", true, true] call BIS_fnc_guiMessage;
if (_result) then {
systemChat "The player is sure.";
} else {
systemChat "The player is not sure.";
};
BIS_fnc_GUIhint · BIS_fnc_3DENShowMessage · hintC
Message boxes can be force-closed with:
uiNamespace setVariable ["BIS_fnc_guiMessage_status", false];
Calling this function can cause an game crash. When doing this you have to spawn the function or add an spawn around it so you can use the result:
[] spawn
{
private _result = ["Are you sure?", "Confirm", true, true] call BIS_fnc_guiMessage;
// Use _result here
};
This function only exists along with mission display (findDisplay 46). If this function is called before with -skipIntro parameter enabled (see Arma 3: Startup Parameters) it will result as Void.