{"name":"BIS_fnc_establishingShot","operator":null,"title":"BIS fnc establishingShot","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_establishingShot","revid":370443,"updated":"2024-12-10T00:25:43Z","groups":["GUI"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.00"}],"since":{"game":"arma3","name":"Arma 3","version":"1.00"},"arma3_since":"1.00","branch":null,"locality":{"argument":"global","effect":"local","server_exec":false},"exec":"spawn","description":"Plays a fake UAV observational sequence which serves as an establishing shot.","syntaxes":[{"syntax":"[target, text, altitude, radius, angle, rotation, iconOptions, mode, fadeIn, waitTime] spawn BIS_fnc_establishingShot","since":null,"effect":null,"exec":null,"params":[{"name":"target","type":"Object or Array","optional":false,"default":null,"description":"target or target's position","types":["Object","Array"],"since":null,"text":"target: Object or Array - target or target's position"},{"name":"text","type":"String","optional":true,"default":"\"\"","description":"text to display","types":["String"],"since":null,"text":"text: String - (Optional, default \"\") text to display"},{"name":"altitude","type":"Number","optional":true,"default":"500","description":"altitude in meters","types":["Number"],"since":null,"text":"altitude: Number - (Optional, default 500) altitude in meters"},{"name":"radius","type":"Number","optional":true,"default":"200","description":"radius of the circular movement in meters","types":["Number"],"since":null,"text":"radius: Number - (Optional, default 200) radius of the circular movement in meters"},{"name":"angle","type":"Number","optional":true,"default":"random","description":"viewing angle in degrees","types":["Number"],"since":null,"text":"angle: Number - (Optional, default random) viewing angle in degrees"},{"name":"rotation","type":"Number","optional":true,"default":"random","description":"direction of camera movement\n- 0: anti-clockwise\n- 1: clockwise","types":["Number"],"since":null,"text":"rotation: Number - (Optional, default random) direction of camera movement\n- 0: anti-clockwise\n- 1: clockwise"},{"name":"iconOptions","type":"Array of Arrays","optional":true,"default":"`[]`","description":"each array in format [icon, color, target, sizeX, sizeY, angle, text, shadow]:\n- icon: String - path to icon texture\n- color: Array format Color (RGBA)\n- target: Object, Position or Group - where the texture should be drawn\n- sizeX: Number - (Optional, default 1) icon width\n- sizeY: Number - (Optional, default 1) icon height\n- angle: Number - (Optional, default random 360) icon angle\n- text: String - (Optional, default \"\") text displayed underneath the icon\n- shadow: Number - (Optional, default 0)\n  - 0 to draw a flat icon\n  - 1 to draw a shadowed icon","types":["Array"],"since":null,"text":"iconOptions: Array of Arrays - (Optional, default `[]`) each array in format [icon, color, target, sizeX, sizeY, angle, text, shadow]:\n- icon: String - path to icon texture\n- color: Array format Color (RGBA)\n- target: Object, Position or Group - where the texture should be drawn\n- sizeX: Number - (Optional, default 1) icon width\n- sizeY: Number - (Optional, default 1) icon height\n- angle: Number - (Optional, default random 360) icon angle\n- text: String - (Optional, default \"\") text displayed underneath the icon\n- shadow: Number - (Optional, default 0)\n  - 0 to draw a flat icon\n  - 1 to draw a shadowed icon"},{"name":"mode","type":"Number","optional":true,"default":"0","description":"0: normal (disables saving and sets `BIS_missionStarted` to nil)\n- 1: world scenes (i.e. for main menu background, doesn't display text and does not end)","types":["Number"],"since":null,"text":"mode: Number - (Optional, default 0)\n- 0: normal (disables saving and sets `BIS_missionStarted` to nil)\n- 1: world scenes (i.e. for main menu background, doesn't display text and does not end)"},{"name":"fadeIn","type":"Boolean","optional":true,"default":"true","description":"fade in after completion","types":["Boolean"],"since":null,"text":"fadeIn: Boolean - (Optional, default true) fade in after completion"},{"name":"waitTime","type":"Number","optional":true,"default":"2","description":"wait time in seconds after the shot has been completed","types":["Number"],"since":"arma3 1.82","text":"waitTime: Number - (Optional, default 2) wait time in seconds after the shot has been completed"}],"returns":{"type":"Boolean","types":["Boolean"],"description":"true when done","text":"Boolean - true when done"}}],"examples":[{"text":"```sqf\n[player, \"I can see my house from here\", 500, 250, 75, 1, [], 0, true] spawn BIS_fnc_establishingShot;\n```","code":["[player, \"I can see my house from here\", 500, 250, 75, 1, [], 0, true] spawn BIS_fnc_establishingShot;"]},{"text":"```sqf\n[\n    [5229.97, 5233.07, 0],\n    \"BLUFOR and OPFOR firefight\",\n    500,\n    250,\n    75,\n    1,\n    [\n        [\"\\A3\\ui_f\\data\\map\\markers\\nato\\b_inf.paa\", [0, 0.3, 0.6, 1], group_1, 1, 1, 0, \"BLUFOR\"],\n        [\"\\A3\\ui_f\\data\\map\\markers\\nato\\o_inf.paa\", [0.5, 0, 0, 1], group_2, 1, 1, 0, \"OPFOR\"]\n    ],\n    0,\n    true,\n    15\n] spawn BIS_fnc_establishingShot;\n```","code":["[\n\t[5229.97, 5233.07, 0],\n\t\"BLUFOR and OPFOR firefight\",\n\t500,\n\t250,\n\t75,\n\t1,\n\t[\n\t\t[\"\\A3\\ui_f\\data\\map\\markers\\nato\\b_inf.paa\", [0, 0.3, 0.6, 1], group_1, 1, 1, 0, \"BLUFOR\"],\n\t\t[\"\\A3\\ui_f\\data\\map\\markers\\nato\\o_inf.paa\", [0.5, 0, 0, 1], group_2, 1, 1, 0, \"OPFOR\"]\n\t],\n\t0,\n\ttrue,\n\t15\n] spawn BIS_fnc_establishingShot;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["BIS_fnc_dynamicText","Arma 3: Mission Presentation"],"notes":[{"user":"Lou Montana","date":"2018-01-28T02:01:00Z","text":"Be aware that spawning this function will set enableSaving to true. Quick workaround:\n\n```sqf\nprivate _savingEnabled = savingEnabled;\n_handle = [player, \"myText\"] spawn BIS_fnc_establishingShot;\nwaitUntil { scriptDone _handle };\nenableSaving [_savingEnabled, false];\n```\n\nOr, if you can't wait the end of the establishing shot:\n\n```sqf\nprivate _savingEnabled = savingEnabled;\n_handle = [player, \"myText\"] spawn BIS_fnc_establishingShot;\n_handle spawn { waitUntil { scriptDone _this }; enableSaving [_savingEnabled, false]; };\n```"},{"user":"R3vo","date":"2019-07-30T12:01:00Z","text":"In order to change the camera to TI or NVG mode execute the following right after BIS_fnc_establishingShot was spawned.\n\n```sqf\ntrue setCamUseTI 1;\n```\n\nThe effect will automatically be terminated once the establishing shot ended."}],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: GUI","Functions","Functions: Local Effect","Introduced with Arma 3 version 1.00"],"docblock":null,"filled_from_docblock":[]}