BIS fnc animatedBriefing: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{Function|= Comments " to "{{Function|Comments= ")
mNo edit summary
Line 1: Line 1:
{{Function|Comments=
{{Function


| arma3 |Game name=
|game1= arma3


|1.78|Game version=
|version1= 1.78


<!---|arg= local |Multiplayer Arguments=--->
<!--|serverExec= server-->


<!---|eff= local |Multiplayer Effects=--->
<!--|arg= local-->


| <pre>/*
<!--|eff= local-->
Author: Zozo, modified by Riccardo Argiolas


Description:
|descr= Plays the Animated Briefings. Basically, it is a wrap function for the eventTimeline function.
Plays the Animated Briefings. Basically, it is a wrap function for the eventTimeline function.


Parameters:
|s1= [timeline, indexEvent, markersHide, markersShow, endPosition] [[call]] [[BIS_fnc_animatedBriefing]]
Select 0 - 2D ARRAY : timeline in format [ [1.0, {code} ], [2.0, {code} ], [2.3, {code} ], [4.7, {code} ] ]
Select 1 - NUMBER: index of the event to play
Select 2 (OPTIONAL)- ARRAY: markers to hide before the briefing starts and when the briefing has been completed
Select 3 (OPTIONAL)- ARRAY: markers to show after the briefing has been completed
Select 4 (OPTIONAL)- STRING: marker to zoom to instantly when the briefing is over
Select 5 (OPTIONAL)- BOOL: will the player have the ability to close the map at the end of the briefing?
Select 6 (OPTIONAL)- CODE: code that will be executed when the briefing is over or is skipped


Returns:
|p1= timeline: [[Array]] - Array in format:  
none
* time: [[Number]] - Time the code is executed
*/</pre>{{placeholder}}<!-- Remove this after fill-in --> |Description=
* code: [[Code]] - Coded which is executed when time is reached


|[] call [[BIS_fnc_animatedBriefing]]|Syntax=
|p2= indexEvent: [[Number]] - Index of the event to play


|p1= parameter: Datatype - (Optional, default defValue) description |Parameter 1=
|p3= markersHide: [[Array]] - (Optional, default []) Array of markers which should be hidden when briefing starts


|Datatype - description|Return value=
|p4= markersShow: [[Array]] - (Optional, default []) Array of markers which should be shown when the briefing is done


|x1= <code></code>|Example 1=
|p5= endPosition: [[String]] - (Optional, default "") Marker to focus when the briefing is done


|exec= call |Execution=
|p6= codeEnd: [[Code]] - (Optional, default {}) Code executed when briefing is done
 
|r1= [[Nothing]]
 
|x1= <code>{{cc|timeline of events}}
_timeline =
[
[0.0, { [[hint]] "Start of the Timeline" } ],
[1.0, { [[hint]] "Event 1" }    ],
[3.0, { [[hint]] "End of the timeline" }  ]
];
 
{{cc|get markers to be shown at end by using the layer's name}}
private _showMarkers = ([[getMissionLayerEntities]] "showAtEnd") [[select]] 1;
 
{{cc|start the Animated Briefing at index 0}}
{{cc|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}}
[_timeline, 0, [[nil]], [[allMapMarkers]], _showMarkers, "marker_rect_1"] [[spawn]] [[BIS_fnc_animatedBriefing]];
 
// Wait until timeline is over
[[waitUntil]] { !([[missionNamespace]] [[getVariable]] "BIS_fnc_eventTimeline_playing"); };</code>
 
|exec= spawn
 
|seealso=


| |See also=
}}
}}
[[Category:Function Group: Systems|{{uc:animatedBriefing}}]]
[[Category:Functions|{{uc:animatedBriefing}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:animatedBriefing}}]]

Revision as of 22:05, 29 September 2020

Hover & click on the images for description

Description

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

Syntax

Syntax:
[timeline, indexEvent, markersHide, markersShow, endPosition] call BIS_fnc_animatedBriefing
Parameters:
timeline: Array - Array in format:
  • time: Number - Time the code is executed
  • code: Code - Coded which is executed when time is reached
indexEvent: Number - Index of the event to play
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:
See also needed

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