{"name":"BIS_fnc_sceneMiscStuff","title":"BIS fnc sceneMiscStuff","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_sceneMiscStuff","revid":379572,"updated":"2026-10-31T14:00:56Z","groups":["Scenes"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","exec":"spawn","description":"Prepares the player's surroundings for a scripted scene (cutscene) and restores them afterwards. The function:\n\n1. 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)\n1. creates the game logic `BIS_sceneLogic` (broadcast with publicVariable) through which the scene is controlled\n1. fades the screen to black (unless *skipInitBlackout*) and shows a loading screen (unless *skipLoadingScreen*)\n1. 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\n1. 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)\n1. waits for the scene script to set `BIS_sceneLogic`'s variable \"_doTheEndOfScene\" to true, then stops the intruder detection\n1. unless *skipFinalBlackout*, fades to black, sets \"_endDone\" to true, shows a loading screen and waits for \"_doTheBlackIN\" to be true again\n1. restores the HUD elements and time acceleration, fades in (unless *skipFinalBlackout*) and deletes `BIS_sceneLogic`\n\nThe function itself returns after the initial fade out; the rest runs in a spawned script.\n\nIf `BIS_debugScene` is true, no blackouts are done and a manual camera is created at *cameraPositions* instead.\n\n> [!IMPORTANT]\n> - The function uses `RE` with `rFADEMUSIC` and `rTITLECUT` from the Multiplayer Framework, which must be initialised.\n> - The global variable `BIS_debugScene` is read without a default value and must be defined as a Boolean.\n> - No other function or script in Arma 3's functions library calls this function.","syntaxes":[{"syntax":"[cameraPositions, skipInitBlackout, skipFinalBlackout, skipWeaponCheck, skipLoadingScreen, excludedObjects] spawn BIS_fnc_sceneMiscStuff","params":[{"name":"cameraPositions","type":"Array","optional":true,"description":"format [cameraTarget, cameraPosition], both Positions; only used when `BIS_debugScene` is true","type_expr":"Array","text":"cameraPositions: Array - (Optional) format [cameraTarget, cameraPosition], both Positions; only used when `BIS_debugScene` is true"},{"name":"skipInitBlackout","type":"Boolean","optional":true,"default":"false","description":"true to skip the initial fade out","type_expr":"Boolean","text":"skipInitBlackout: Boolean - (Optional, default false) true to skip the initial fade out"},{"name":"skipFinalBlackout","type":"Boolean","optional":true,"default":"false","description":"true to skip the fade out and fade in at the end of the scene","type_expr":"Boolean","text":"skipFinalBlackout: Boolean - (Optional, default false) true to skip the fade out and fade in at the end of the scene"},{"name":"skipWeaponCheck","type":"Boolean","optional":true,"default":"false","description":"stored on `BIS_sceneLogic` as \"_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 units","type_expr":"Boolean","text":"skipWeaponCheck: Boolean - (Optional, default false) stored on `BIS_sceneLogic` as \"_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 units"},{"name":"skipLoadingScreen","type":"Boolean","optional":true,"default":"false","description":"true to not show a loading screen during the blackouts","type_expr":"Boolean","text":"skipLoadingScreen: Boolean - (Optional, default false) true to not show a loading screen during the blackouts"},{"name":"excludedObjects","type":"Array of Objects","optional":true,"default":"[]","description":"objects ignored by BIS_fnc_sceneIntruderDetector","type_expr":"Array<Object>","text":"excludedObjects: Array of Objects - (Optional, default []) objects ignored by BIS_fnc_sceneIntruderDetector"}],"returns":{"type":"Nothing","type_expr":"Nothing"}}],"examples":[{"code":["BIS_debugScene = false;\n[[getPosATL sceneTarget, getPosATL sceneCamera], false, true] spawn BIS_fnc_sceneMiscStuff;\nwaitUntil { !isNil \"BIS_sceneLogic\" };\n\n// ... set up the scene while the screen is black ...\nBIS_sceneLogic setVariable [\"_doTheBlackIN\", true];\n\n// ... the scene plays ...\nBIS_sceneLogic setVariable [\"_doTheEndOfScene\", true];"]}],"see_also":["BIS_fnc_sceneIntruderDetector","BIS_fnc_sceneCheckWeapons"]}