BIS fnc EXP camp playSubtitles: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Game name " to "|Game name= ")
m (Text replacement - "{{Feature | Informative | " to "{{Feature|informative|")
 
(31 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|Comments=
|game1= arma3
____________________________________________________________________________________________
|version1= 1.62


| arma3 |Game name=
|gr1= GUI


|1.62|Game version=
|descr= Displays the given subtitles at the correctly defined moments. Each array added to the parameters represents one subtitle.
____________________________________________________________________________________________
{{Feature|informative|Subtitles can be cancelled by setting {{hl|BIS_fnc_EXP_camp_playSubtitles_terminate}} to [[true]].}}


| Displays the given subtitles at the correctly defined moments. Each array added to the parameters represents one subtitle.
|s1= [subtitleDetail1, subtitleDetail2, ...] spawn [[BIS_fnc_EXP_camp_playSubtitles]]
{{note|Subtitles can be cancel by setting BIS_fnc_EXP_camp_playSubtitles_terminate to [[true]]}}
|DESCRIPTION=
____________________________________________________________________________________________


| [ [Array] ] [[spawn]] [[BIS_fnc_EXP_camp_playSubtitles]];
|p1= subtitleDetailN: [[Array]] - format [speaker, text, timing]:
* speaker: [[String]] - speaker's name
* text: [[String]] - subtitle
* timing: [[Number]] - time at which the subtitle is played


|r1= [[Boolean]] - [[true]] if successful, [[false]] if not


|p1= Array [[Array]] - Array containing all infos for the first subtitle |PARAMETER1=
|x1= <sqf>
*|p2= Array select 0 [[String]] - Name of the speaker |PARAMETER2=
[
*|p3= Array select 1 [[String]] - Subtitle |PARAMETER3=
["CROSSROAD", "Mission is a go, I repeat, mission is a go! Crossroad, out.", 0]
*|p4= Array select 2 [[Number]] - Time at which the subtitle is played |PARAMETER4=
] spawn BIS_fnc_EXP_camp_playSubtitles; // shows a subtitle immediately
</sqf>
|x2= <sqf>
[
["Speaker1", "Subtitle1", 0],
["Speaker2", "Subtitle2", 5],
["Speaker3", "Subtitle3", 10],
["Speaker4", "Subtitle4", 15]
] spawn BIS_fnc_EXP_camp_playSubtitles; // displays 4 subtitles with 5 seconds between them


| [[Bool]] - True if sucessful, false if not |= return
sleep 7;
____________________________________________________________________________________________
BIS_fnc_EXP_camp_playSubtitles_terminate = true; // closes subtitles
</sqf>


|x1= <code>[
|exec= spawn
  ["CROSSROAD","Mission is a go, I repeat, mission is a go! Crossroad, out.",0]
] [[spawn]] [[BIS_fnc_EXP_camp_playSubtitles]];//Shows a subtitle immediately</code> |EXAMPLE1=
|x2= <code>[
  ["Speaker1","Subtitle1",0],
  ["Speaker2","Subtitle2",5],
  ["Speaker3","Subtitle3",10],
  ["Speaker4","Subtitle5",15]
] [[spawn]] [[BIS_fnc_EXP_camp_playSubtitles]]; //Displays 4 subtitles, with 5 seconds in between them</code> |EXAMPLE2=
 
____________________________________________________________________________________________
 
|exec= spawn |= Execution By (defaults to [[call]] if omitted)
 
|[[BIS_fnc_showSubtitle]]|SEEALSO=


|seealso= [[Conversations]] [[BIS_fnc_showSubtitle]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Ambient|{{uc:ambientAnimCombat}}]]
[[Category:Functions|{{uc:ambientAnimCombat}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:ambientAnimCombat}}]]

Latest revision as of 21:41, 16 May 2024

Hover & click on the images for description

Description

Description:
Displays the given subtitles at the correctly defined moments. Each array added to the parameters represents one subtitle.
Subtitles can be cancelled by setting BIS_fnc_EXP_camp_playSubtitles_terminate to true.
Execution:
spawn
Groups:
GUI

Syntax

Syntax:
[subtitleDetail1, subtitleDetail2, ...] spawn BIS_fnc_EXP_camp_playSubtitles
Parameters:
subtitleDetailN: Array - format [speaker, text, timing]:
  • speaker: String - speaker's name
  • text: String - subtitle
  • timing: Number - time at which the subtitle is played
Return Value:
Boolean - true if successful, false if not

Examples

Example 1:
[ ["CROSSROAD", "Mission is a go, I repeat, mission is a go! Crossroad, out.", 0] ] spawn BIS_fnc_EXP_camp_playSubtitles; // shows a subtitle immediately
Example 2:
[ ["Speaker1", "Subtitle1", 0], ["Speaker2", "Subtitle2", 5], ["Speaker3", "Subtitle3", 10], ["Speaker4", "Subtitle4", 15] ] spawn BIS_fnc_EXP_camp_playSubtitles; // displays 4 subtitles with 5 seconds between them sleep 7; BIS_fnc_EXP_camp_playSubtitles_terminate = true; // closes subtitles

Additional Information

See also:
Conversations BIS_fnc_showSubtitle

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