BIS fnc animatedBriefing: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|game([0-9])=([^ ]+) * \|version([0-9])=([^ ]+) * " to "|game$1=$2 |version$3=$4 ")
m (Some wiki formatting)
 
(25 intermediate revisions by 2 users not shown)
Line 10: Line 10:
|eff= local
|eff= local


|descr= Plays the Animated Briefings. Basically, it is a wrap function for the eventTimeline function.
|descr= Plays the Animated Briefings. Basically, it is a wrap function for the [[BIS_fnc_eventTimeline]] function.


|s1= [timeline, indexEvent, markersHide, markersShow, endPosition] [[call]] [[BIS_fnc_animatedBriefing]]
|s1= [timeline, indexEvent, music, markersHide, markersShow, endPosition] call [[BIS_fnc_animatedBriefing]]


|p1= timeline: [[Array]] - Array in format:  
|p1= timeline: [[Array]] - array in format [time, code]:  
* time: [[Number]] - Time the code is executed
* time: [[Number]] - time the code is executed
* code: [[Code]] - Coded which is executed when time is reached
* code: [[Code]] - code executed when ''time'' is reached


|p2= indexEvent: [[Number]] - Index of the event to play
|p2= indexEvent: [[Number]] - index of the event to play


|p3= markersHide: [[Array]] - (Optional, default []) Array of markers which should be hidden when briefing starts
|p3= music: [[String]] - (Optional, default "") CfgMusic class


|p4= markersShow: [[Array]] - (Optional, default []) Array of markers which should be shown when the briefing is done
|p4= markersHide: [[Array]] - (Optional, default {{hl|[]}}) array of markers which should be hidden when briefing starts


|p5= endPosition: [[String]] - (Optional, default "") Marker to focus when the briefing is done
|p5= markersShow: [[Array]] - (Optional, default {{hl|[]}}) array of markers which should be shown when the briefing is done


|p6= codeEnd: [[Code]] - (Optional, default {}) Code executed when briefing is done
|p6= endPosition: [[String]] - (Optional, default "") marker to focus when the briefing is done
 
|p7= codeEnd: [[Code]] - (Optional, default {{hl|{}<nowiki/>}}) code executed when briefing is done


|r1= [[Nothing]]
|r1= [[Nothing]]


|x1= <code>{{cc|timeline of events}}
|x1= <sqf>
_timeline =
// timeline of events
[
_timeline = [
[0.0, { [[hint]] "Start of the Timeline" } ],
[0.0, { hint "Start of the Timeline" }],
[1.0, { [[hint]] "Event 1" }     ],
[1.0, { hint "Event 1" }],
[3.0, { [[hint]] "End of the timeline" } ]
[3.0, { hint "End of the timeline" }]
];
];


{{cc|get markers to be shown at end by using the layer's name}}
// get markers to be shown at end by using the layer's name
private _showMarkers = ([[getMissionLayerEntities]] "showAtEnd") [[select]] 1;
private _showMarkers = (getMissionLayerEntities "showAtEnd") select 1;


{{cc|start the Animated Briefing at index 0}}
// start the Animated Briefing at index 0
{{cc|hide all markers and show the markers from the "showAtEnd" layer after the briefing is done}}
// hide all markers and show the markers from the "showAtEnd" layer after the briefing is done
{{cc|zoom on marker_rect_1 at the end of the briefing}}
// zoom on marker_rect_1 at the end of the briefing
[_timeline, 0, [[nil]], [[allMapMarkers]], _showMarkers, "marker_rect_1"] [[spawn]] [[BIS_fnc_animatedBriefing]];
[_timeline, 0, "", nil, allMapMarkers, _showMarkers, "marker_rect_1"] spawn BIS_fnc_animatedBriefing;


// Wait until timeline is over
// Wait until timeline is over
[[waitUntil]] { !([[missionNamespace]] [[getVariable]] "BIS_fnc_eventTimeline_playing"); };</code>
waitUntil { !(missionNamespace getVariable "BIS_fnc_eventTimeline_playing"); };
</sqf>


|exec= spawn  
|exec= spawn  


|seealso= [[Arma 3 Animated Briefing]] [[BIS_fnc_eventTimeline]]
|seealso= [[Arma 3: Animated Briefing]] [[BIS_fnc_eventTimeline]]
}}
}}

Latest revision as of 22:17, 17 April 2024

Hover & click on the images for description

Description

Description:
Plays the Animated Briefings. Basically, it is a wrap function for the BIS_fnc_eventTimeline function.
Execution:
spawn
Groups:
SystemsBriefing

Syntax

Syntax:
[timeline, indexEvent, music, markersHide, markersShow, endPosition] call BIS_fnc_animatedBriefing
Parameters:
timeline: Array - array in format [time, code]:
  • time: Number - time the code is executed
  • code: Code - code executed when time is reached
indexEvent: Number - index of the event to play
music: String - (Optional, default "") CfgMusic class
markersHide: Array - (Optional, default []) array of markers which should be hidden when briefing starts
markersShow: Array - (Optional, default []) array of markers which should be shown when the briefing is done
endPosition: String - (Optional, default "") marker to focus when the briefing is done
codeEnd: Code - (Optional, default {}) code executed when briefing is done
Return Value:
Nothing

Examples

Example 1:
// timeline of events _timeline = [ [0.0, { hint "Start of the Timeline" }], [1.0, { hint "Event 1" }], [3.0, { hint "End of the timeline" }] ]; // get markers to be shown at end by using the layer's name private _showMarkers = (getMissionLayerEntities "showAtEnd") select 1; // start the Animated Briefing at index 0 // hide all markers and show the markers from the "showAtEnd" layer after the briefing is done // zoom on marker_rect_1 at the end of the briefing [_timeline, 0, "", nil, allMapMarkers, _showMarkers, "marker_rect_1"] spawn BIS_fnc_animatedBriefing; // Wait until timeline is over waitUntil { !(missionNamespace getVariable "BIS_fnc_eventTimeline_playing"); };

Additional Information

See also:
Arma 3: Animated Briefing BIS_fnc_eventTimeline

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note