Arma 3 Scripting

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:

  1. 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)
  2. creates the game logic BIS_sceneLogic (broadcast with publicVariable) through which the scene is controlled
  3. fades the screen to black (unless skipInitBlackout) and shows a loading screen (unless skipLoadingScreen)
  4. 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
  5. 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)
  6. waits for the scene script to set BIS_sceneLogic's variable "_doTheEndOfScene" to true, then stops the intruder detection
  7. unless skipFinalBlackout, fades to black, sets "_endDone" to true, shows a loading screen and waits for "_doTheBlackIN" to be true again
  8. 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 RE with rFADEMUSIC and rTITLECUT from the Multiplayer Framework, which must be initialised.
  • The global variable BIS_debugScene is 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:

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];

See also

BIS_fnc_sceneIntruderDetector · BIS_fnc_sceneCheckWeapons