BIS_fnc_sceneMiscStuff
- Runs with spawn
- Arma 3 v0.50
- First in Arma 2 v1.00
Function · Markdown · JSON · original wiki page
Description
Prepares the player's surroundings for a scripted scene (cutscene) and restores them afterwards. The function:
- fades out the music, clears the radio, disables sentences and waits until the camera at the player's position is preloaded (at most 6 seconds)
- creates the game logic
BIS_sceneLogic(broadcast with publicVariable) through which the scene is controlled - fades the screen to black (unless skipInitBlackout) and shows a loading screen (unless skipLoadingScreen)
- hides the watch, compass, GPS and HUD, keeps the time acceleration at 1 and forces the player's first person view during the whole scene
- waits for the scene script to set
BIS_sceneLogic's variable "_doTheBlackIN" to true, then closes the loading screen, fades in and starts BIS_fnc_sceneIntruderDetector (around the player) - waits for the scene script to set
BIS_sceneLogic's variable "_doTheEndOfScene" to true, then stops the intruder detection - unless skipFinalBlackout, fades to black, sets "_endDone" to true, shows a loading screen and waits for "_doTheBlackIN" to be true again
- restores the HUD elements and time acceleration, fades in (unless skipFinalBlackout) and deletes
BIS_sceneLogic
The function itself returns after the initial fade out; the rest runs in a spawned script.
If BIS_debugScene is true, no blackouts are done and a manual camera is created at cameraPositions instead.
Important
- The function uses
REwithrFADEMUSICandrTITLECUTfrom the Multiplayer Framework, which must be initialised.- The global variable
BIS_debugSceneis read without a default value and must be defined as a Boolean.- No other function or script in Arma 3's functions library calls this function.
Syntax
[cameraPositions, skipInitBlackout, skipFinalBlackout, skipWeaponCheck, skipLoadingScreen, excludedObjects] spawn BIS_fnc_sceneMiscStuff
Parameters:
cameraPositions: Array - (Optional) format [cameraTarget, cameraPosition], both Positions; only used whenBIS_debugSceneis trueskipInitBlackout: Boolean - (Optional, default false) true to skip the initial fade outskipFinalBlackout: Boolean - (Optional, default false) true to skip the fade out and fade in at the end of the sceneskipWeaponCheck: Boolean - (Optional, default false) stored onBIS_sceneLogicas "_noUseCheckTheWeapons"; it has no effect, as the weapon check code is commented out. It is forced to true if the player's group has fewer than 4 unitsskipLoadingScreen: Boolean - (Optional, default false) true to not show a loading screen during the blackoutsexcludedObjects: Array of Objects - (Optional, default []) objects ignored by BIS_fnc_sceneIntruderDetector
Returns: Nothing
Examples
Example 1
BIS_debugScene = false;
[[getPosATL sceneTarget, getPosATL sceneCamera], false, true] spawn BIS_fnc_sceneMiscStuff;
waitUntil { !isNil "BIS_sceneLogic" };
// ... set up the scene while the screen is black ...
BIS_sceneLogic setVariable ["_doTheBlackIN", true];
// ... the scene plays ...
BIS_sceneLogic setVariable ["_doTheEndOfScene", true];