BIS fnc kbTell: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
(Page formatting)
Line 8: Line 8:
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>/*
| Plays conversation. Script terminates itself when conversation is finished. |= Description
____________________________________________________________________________________________
 
| [topic, container, section, radioMode, code, speakers, soundVolume, radioProtocol] call [[BIS_fnc_kbTell]] |= Syntax
 
|p1= topic: [[String]] - topic name |= Parameter 1
 
|p2= container: [[String]] - (Optional) container name (default: current mission ID) |= Parameter 2


Description:
|p3= section: [[Array]] - (Optional) section to be played. Elements can be:
Plays conversation. Script terminates itself when conversation is finished.
* [[String]] - "variant" - play specific variant
* [[Array]]
** [startingSentence(, endingSentence)] - play all sentences between specific start and end
*** startingSentence can be in format:
**** [[String]] - full sentence name (example: "04_intro_team_PLA_0")
**** [[Array]] - [<actorID>(, <sentenceID>)] (example: ["PLA", 0] or just ["PLA_0"])
**** [[Bool]] - true to play random sentence, false to play first sentence
**** default - first sentence
*** endingSentence can be in format:
**** [[String]] - full sentence name (example: "04_intro_team_PLA_0")
**** [[Array]] - [<actorID>(, <sentenceID>)] (example: ["PLA", 0] or just ["PLA_0"])
**** [[Bool]] - true to play only one sentence, false if continue to last sentence
**** default - last sentence
* default: play everything |= Parameter 3


Parameter(s):
|p4= radioMode: [[Bool]], [[String]], [[Object]] or [[Code]] - (Optional) can be:
_this select 0: STRING - Topic name
* [[Bool]] - true to force radio
_this select 1 (Optional): STRING - container name (default: current mission ID)
* [[String]] - name of custom radio channel
_this select 2 (Optional): ARRAY - section to be played. Elements can be:
* [[Object]] - listener's channel
* STRING - "variant" - play specific variant
* [[Code]] - returned value of code |= Parameter 4
* ARRAY
* [startingSentence,(endingSentence)] - play al sentences between specific start and end
startingSentence can be in format:
* STRING - full sentence name (example: 04_intro_team_PLA_0")
* ARRAY - [<actorID>(,<sentenceID>)] (example: ["PLA",0] or just ["PLA_0"])
* BOOL - true to play random sentence, false to play first sentence
* default - first sentence
endingSentence can be in format:
* STRING - full sentence name (example: 04_intro_team_PLA_0")
* ARRAY - [<actorID>(,<sentenceID>)] (example: ["PLA",0] or just ["PLA_0"])
* BOOL - true to play only one sentence, false if continue to last sentence
* default - last sentence
* (default: play everything)
_this select 3 (Optional): BOOL or STRING or OBJECT or CODE - true to force radio, name of custom radio channel, listener's channel, returned value of code
_this select 4 (Optional): CODE - code executed at the start of every sentence (arguments are same as in kbAddTopic event handler) (default: {})
  ARRAY - code with arguments in format [code,arguments]
_this select 5 (Optional):
ARRAY - replacement units for those defined in .bikb file (in chronological order)
BOOL - when true, dummy logics will be created for all actor units which doesn't exist (default: false or value of 'bis_fnc_kbTell_createDummy' variable)
_this select 6 (Optional): NUMBER - music and sound volumes will be multiplied by this value when conversation starts (default: 0.1)
_this select 7 (Optional): BOOL - true to disable radio protocol message while the conversation is playing (default: true)


Returns:
|p5= code: [[Code]] or [[Array]] - (Optional, default: {}) can be:
NOTHING
* [[Code]] - executed at the start of every sentence (arguments are same as in kbAddTopic event handler)
*/
* [[Array]] - code with arguments in format [code, arguments] |= Parameter 5
//Todo: priority kbTell stppoing current conversation, split into several functions (config loading)
 
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
|p6= speakers: [[Array]] or [[Bool]] - (Optional) can be:
____________________________________________________________________________________________
* [[Array]] - replacement units for those defined in .bikb file (in chronological order)
* [[Bool]] - when true, dummy logics will be created for all actor units which doesn't exist (default: false or value of 'bis_fnc_kbTell_createDummy' variable) |= Parameter 6


| <!-- [] call [[BIS_fnc_kbTell]]; --> |= Syntax
|p7= soundVolume: [[Number]] - (Optional, default: 0.1) music and sound volumes will be multiplied by this value when conversation starts |= Parameter 7


|p1= |= Parameter 1
|p8= radioProtocol: [[Bool]] - (Optional, default: true) true to disable radio protocol message while the conversation is playing |= Parameter 8


| |= Return value
| [[Nothing]] |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 17:15, 30 March 2018


Hover & click on the images for description

Description

Description:
Plays conversation. Script terminates itself when conversation is finished.
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[topic, container, section, radioMode, code, speakers, soundVolume, radioProtocol] call BIS_fnc_kbTell
Parameters:
topic: String - topic name
container: String - (Optional) container name (default: current mission ID)
section: Array - (Optional) section to be played. Elements can be:
  • String - "variant" - play specific variant
  • Array
    • [startingSentence(, endingSentence)] - play all sentences between specific start and end
      • startingSentence can be in format:
        • String - full sentence name (example: "04_intro_team_PLA_0")
        • Array - [<actorID>(, <sentenceID>)] (example: ["PLA", 0] or just ["PLA_0"])
        • Bool - true to play random sentence, false to play first sentence
        • default - first sentence
      • endingSentence can be in format:
        • String - full sentence name (example: "04_intro_team_PLA_0")
        • Array - [<actorID>(, <sentenceID>)] (example: ["PLA", 0] or just ["PLA_0"])
        • Bool - true to play only one sentence, false if continue to last sentence
        • default - last sentence
  • default: play everything
radioMode: Bool, String, Object or Code - (Optional) can be:
  • Bool - true to force radio
  • String - name of custom radio channel
  • Object - listener's channel
  • Code - returned value of code
code: Code or Array - (Optional, default: {}) can be:
  • Code - executed at the start of every sentence (arguments are same as in kbAddTopic event handler)
  • Array - code with arguments in format [code, arguments]
speakers: Array or Bool - (Optional) can be:
  • Array - replacement units for those defined in .bikb file (in chronological order)
  • Bool - when true, dummy logics will be created for all actor units which doesn't exist (default: false or value of 'bis_fnc_kbTell_createDummy' variable)
soundVolume: Number - (Optional, default: 0.1) music and sound volumes will be multiplied by this value when conversation starts
radioProtocol: Bool - (Optional, default: true) true to disable radio protocol message while the conversation is playing
Return Value:
Nothing

Examples

Example 1:

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

Notes

Bottom Section