BIS fnc kbTell: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Add examples and See also) |
Lou Montana (talk | contribs) m (Add CfgSentences information, fix example, fix default values) |
||
Line 12: | Line 12: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| Play given sentence/conversation. Script terminates itself when conversation is finished. | | Play given sentence/conversation. Script terminates itself when conversation is finished.<br /> | ||
Conversation must be declared in [[Description.ext#CfgSentences|Description.ext/CfgSentences]]. | |||
{{note|This function can also be executed with [[call]]. Doing so will make it internally [[spawn]] since it needs to be able suspend its execution.}} |= Description | {{note|This function can also be executed with [[call]]. Doing so will make it internally [[spawn]] since it needs to be able suspend its execution.}} |= Description | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 20: | Line 21: | ||
|p1= topic: [[String]] - topic name |= Parameter 1 | |p1= topic: [[String]] - topic name |= Parameter 1 | ||
|p2= container: [[String]] - (Optional) container name ( | |p2= container: [[String]] - (Optional, default [[missionName]]) container name ([[Description.ext#CfgSentences|CfgSentences]] sub-category) |= Parameter 2 | ||
|p3= section: [[Array]] - (Optional) section to be played. Elements can be: | |p3= section: [[Array]] or [[String]] - (Optional, default "") section to be played. Elements can be: | ||
* [[String]] - "variant" - play specific variant | * [[String]] - "variant" - play specific variant | ||
* [[Array]] | * [[Array]] | ||
Line 33: | Line 34: | ||
* default: play everything |= Parameter 3 | * default: play everything |= Parameter 3 | ||
|p4= radioMode: [[Bool]], [[String]], [[Object]] or [[Code]] - (Optional) can be: | |p4= radioMode: [[Bool]], [[String]], [[Object]] or [[Code]] - (Optional, default: [[false]]) can be: | ||
* [[Bool]] - true to force radio | * [[Bool]] - true to force radio | ||
* [[String]] - name of radio channel, original or [[radioChannelCreate|custom]] | * [[String]] - name of radio channel, original or [[radioChannelCreate|custom]] | ||
Line 39: | Line 40: | ||
* [[Code]] - returned value of code |= Parameter 4 | * [[Code]] - returned value of code |= Parameter 4 | ||
|p5= code: [[Code]] or [[Array]] - (Optional, default | |p5= code: [[Code]] or [[Array]] - (Optional, default {{Inline code|{[[true]]<nowiki>}</nowiki>}} ) can be: | ||
* [[Code]] - executed at the start of every sentence (arguments are same as in kbAddTopic event handler) | * [[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 | * [[Array]] - code with arguments in format [code, arguments] |= Parameter 5 | ||
|p6= speakers: [[Array]] or [[Bool]] - (Optional) can be: | |p6= speakers: [[Array]] or [[Bool]] - (Optional, default []) can be: | ||
* [[Array]] - replacement units for those defined in .bikb file (in chronological order) | * [[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 | * [[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 | ||
|p7= soundVolume: [[Number]] - (Optional, default | |p7= soundVolume: [[Number]] - (Optional, default 0.1) music and sound volumes will be multiplied by this value when conversation starts |= Parameter 7 | ||
|p8= radioProtocol: [[Bool]] - (Optional, default | |p8= radioProtocol: [[Bool]] - (Optional, default [[true]]) true to disable radio protocol message while the conversation is playing |= Parameter 8 | ||
| [[Nothing]] |= Return value | | [[Nothing]] |= Return value | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1= <code>["01_Wave", "A_in", [[nil]], "SIDE", [[nil]], [[nil]], 1, [[false]]] [[ | |x1= <code>["01_Wave", "A_in", [[nil]], "SIDE", [[nil]], [[nil]], 1, [[false]]] [[spawn]] [[BIS_fnc_kbTell]];</code> |= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Revision as of 21:53, 16 April 2018
Description
- Description:
- Play given sentence/conversation. Script terminates itself when conversation is finished.
Conversation must be declared in Description.ext/CfgSentences. Template:note - Execution:
- spawn
- Groups:
- Uncategorised
Syntax
- Syntax:
- [topic, container, section, radioMode, code, speakers, soundVolume, radioProtocol] spawn BIS_fnc_kbTell
- Parameters:
- topic: String - topic name
- container: String - (Optional, default missionName) container name (CfgSentences sub-category)
- section: Array or String - (Optional, default "") section to be played. Elements can be:
- radioMode: Bool, String, Object or Code - (Optional, default: false) can be:
- code: Code or Array - (Optional, default
{true}
) can be: - speakers: Array or Bool - (Optional, default []) can be:
- 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
Additional Information
- See also:
- ConversationskbTellBIS_fnc_kbCanSpeakBIS_fnc_kbCreateDummyBIS_fnc_kbIsSpeakingBIS_fnc_kbMenuBIS_fnc_kbPriorityBIS_fnc_kbSentenceBIS_fnc_kbSkipBIS_fnc_kbTellLocalBIS_fnc_kbTopicConfig
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