{"name":"BIS_fnc_animatedBriefing","operator":null,"title":"BIS fnc animatedBriefing","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_animatedBriefing","revid":363759,"updated":"2024-04-17T21:17:53Z","groups":["Systems","Briefing"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.78"}],"since":{"game":"arma3","name":"Arma 3","version":"1.78"},"arma3_since":"1.78","branch":null,"locality":{"argument":null,"effect":"local","server_exec":false},"exec":"spawn","description":"Plays the Animated Briefings. Basically, it is a wrap function for the BIS_fnc_eventTimeline function.","syntaxes":[{"syntax":"[timeline, indexEvent, music, markersHide, markersShow, endPosition] call BIS_fnc_animatedBriefing","since":null,"effect":null,"exec":null,"params":[{"name":"timeline","type":"Array","optional":false,"default":null,"description":"array in format [time, code]:\n- time: Number - time the code is executed\n- code: Code - code executed when *time* is reached","types":["Array"],"since":null,"text":"timeline: Array - array in format [time, code]:\n- time: Number - time the code is executed\n- code: Code - code executed when *time* is reached"},{"name":"indexEvent","type":"Number","optional":false,"default":null,"description":"index of the event to play","types":["Number"],"since":null,"text":"indexEvent: Number - index of the event to play"},{"name":"music","type":"String","optional":true,"default":"\"\"","description":"CfgMusic class","types":["String"],"since":null,"text":"music: String - (Optional, default \"\") CfgMusic class"},{"name":"markersHide","type":"Array","optional":true,"default":"`[]`","description":"array of markers which should be hidden when briefing starts","types":["Array"],"since":null,"text":"markersHide: Array - (Optional, default `[]`) array of markers which should be hidden when briefing starts"},{"name":"markersShow","type":"Array","optional":true,"default":"`[]`","description":"array of markers which should be shown when the briefing is done","types":["Array"],"since":null,"text":"markersShow: Array - (Optional, default `[]`) array of markers which should be shown when the briefing is done"},{"name":"endPosition","type":"String","optional":true,"default":"\"\"","description":"marker to focus when the briefing is done","types":["String"],"since":null,"text":"endPosition: String - (Optional, default \"\") marker to focus when the briefing is done"},{"name":"codeEnd","type":"Code","optional":true,"default":"`{}`","description":"code executed when briefing is done","types":["Code"],"since":null,"text":"codeEnd: Code - (Optional, default `{}`) code executed when briefing is done"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"}}],"examples":[{"text":"```sqf\n// timeline of events\n_timeline = [\n    [0.0, { hint \"Start of the Timeline\" }],\n    [1.0, { hint \"Event 1\" }],\n    [3.0, { hint \"End of the timeline\" }]\n];\n\n// get markers to be shown at end by using the layer's name\nprivate _showMarkers = (getMissionLayerEntities \"showAtEnd\") select 1;\n\n// start the Animated Briefing at index 0\n// hide all markers and show the markers from the \"showAtEnd\" layer after the briefing is done\n// zoom on marker_rect_1 at the end of the briefing\n[_timeline, 0, \"\", nil, allMapMarkers, _showMarkers, \"marker_rect_1\"] spawn BIS_fnc_animatedBriefing;\n\n// Wait until timeline is over\nwaitUntil { !(missionNamespace getVariable \"BIS_fnc_eventTimeline_playing\"); };\n```","code":["// timeline of events\n_timeline = [\n\t[0.0, { hint \"Start of the Timeline\" }],\n\t[1.0, { hint \"Event 1\" }],\n\t[3.0, { hint \"End of the timeline\" }]\n];\n\n// get markers to be shown at end by using the layer's name\nprivate _showMarkers = (getMissionLayerEntities \"showAtEnd\") select 1;\n\n// start the Animated Briefing at index 0\n// hide all markers and show the markers from the \"showAtEnd\" layer after the briefing is done\n// zoom on marker_rect_1 at the end of the briefing\n[_timeline, 0, \"\", nil, allMapMarkers, _showMarkers, \"marker_rect_1\"] spawn BIS_fnc_animatedBriefing;\n\n// Wait until timeline is over\nwaitUntil { !(missionNamespace getVariable \"BIS_fnc_eventTimeline_playing\"); };"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["Arma 3: Animated Briefing","BIS_fnc_eventTimeline"],"notes":[],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Briefing","Function Group: Systems","Functions","Functions: Local Effect","Introduced with Arma 3 version 1.78"],"docblock":null,"filled_from_docblock":[]}