
All checks were successful
Build / Build (push) Successful in 28s
This commit refactors several client-side functions to improve code consistency and readability. - Standardizes function descriptions by removing redundant "Function: forge_client..." prefixes and "[Description]" sections, focusing on concise descriptions of the function's purpose. - Updates variable handling in arsenal functions to use GVAR and EGVARS for default values, improving consistency and reducing code duplication. - Removes the bank init function as it is no longer needed. - Adds a done variable to the preinit file.
44 lines
998 B
Plaintext
44 lines
998 B
Plaintext
#include "..\script_component.hpp"
|
|
|
|
/*
|
|
* Author: IDSolutions
|
|
* AI plays a given sentence/conversation
|
|
*
|
|
* Arguments:
|
|
* 0: Unit that is playing the given sentence/conversation <OBJECT>
|
|
* 1: Topic that is being talked about <STRING>
|
|
* 2: Sentence partaining to the topic at hand <STRING>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [player, "topic", "sentence"] call forge_client_briefing_fnc_spawnLecture
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params ["_unit", "_topic", "_sentence"];
|
|
|
|
FORGE_Briefing_inProgress = true;
|
|
publicVariable "FORGE_Briefing_inProgress";
|
|
|
|
while { alive _unit } do {
|
|
_unit disableAI "ALL";
|
|
_unit switchMove " ";
|
|
_handle = [_topic, _sentence, nil, nil, nil, [_unit], 1, false] spawn BIS_fnc_kbTell;
|
|
|
|
if (!alive _unit) exitWith {
|
|
[_unit] spawn BIS_fnc_kbSkip;
|
|
|
|
FORGE_Briefing_inProgress = false;
|
|
publicVariable "FORGE_Briefing_inProgress";
|
|
};
|
|
|
|
uiSleep 5;
|
|
};
|
|
|
|
waitUntil { scriptDone _handle };
|
|
|
|
FORGE_Briefing_inProgress = false;
|
|
publicVariable "FORGE_Briefing_inProgress"; |