BIS fnc genericSentence: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Generated by BIS_fnc_exportFunctionsToWiki)
 
m (Some wiki formatting)
 
(44 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= tkoh
____________________________________________________________________________________________
|version1= 1.00


| tkoh |= Game name
|game2= arma3
|version2= 0.50


|1.00|= Game version
|gr1= Conversations
____________________________________________________________________________________________


| <pre>/*
|descr= Play generic sentence with probablity set by bis_genericSentenceMode variable (0.5 = 50%, 1 = 100%)


Description:
|s1= [class, speaker, delay, canRepeat] call [[BIS_fnc_genericSentence]]
Play generic sentence with probablity set by bis_genericSentenceMode variable (0.5 = 50%, 1 = 100%)


Parameter(s):
|p1= class: [[String]] - sentence name (from ''class RadioProtocol_EN_H'')
_this select 0: STRING - sentence name
_this select 1 (Optional): OBJECT or CODE - speaker (when code, speaker is it's returned value)
_this select 2 (Optional): NUMBER - delay from previous generic sentence: When negative, sentence is played always.
_this select 3 (Optional): BOOL - true to allow repeating same sentence


Returns:
|p2= speaker: [[Object]] or [[Code]] - (Optional) sentence speaker (when code, speaker is it is returned value). Default is 2nd [[crew]] member.
BOOL - true if sentence was played
*/


//--- No radio channel - terminate (client) or initialize (server)
|p3= delay: [[Number]] - (Optional) delay from previous generic sentence: When negative, sentence is played always.
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_genericSentence]]; --> |= Syntax
|p4= canRepeat: [[Boolean]] - (Optional) true to allow repeating same sentence


|p1= |= Parameter 1
|r1= [[Boolean]] - true if sentence was played


| |= Return value
|x1= <sqf>["FeedbackFlightNegativeHeightTooHigh"] call BIS_fnc_genericSentence;</sqf>
____________________________________________________________________________________________


|x1= <code></code> |=
|x2= <sqf>["FeedbackFlightNegativeSpeedTooSlow",nil,5,true] call BIS_fnc_genericSentence;</sqf>
____________________________________________________________________________________________
 
| |= See also


|seealso= [[Generic Sentences]]
}}
}}
<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: Conversations|{{uc:genericSentence}}]]
[[Category:Functions|{{uc:genericSentence}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:genericSentence}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:genericSentence}}]]

Latest revision as of 02:38, 1 August 2022

Hover & click on the images for description

Description

Description:
Play generic sentence with probablity set by bis_genericSentenceMode variable (0.5 = 50%, 1 = 100%)
Execution:
call
Groups:
Conversations

Syntax

Syntax:
[class, speaker, delay, canRepeat] call BIS_fnc_genericSentence
Parameters:
class: String - sentence name (from class RadioProtocol_EN_H)
speaker: Object or Code - (Optional) sentence speaker (when code, speaker is it is returned value). Default is 2nd crew member.
delay: Number - (Optional) delay from previous generic sentence: When negative, sentence is played always.
canRepeat: Boolean - (Optional) true to allow repeating same sentence
Return Value:
Boolean - true if sentence was played

Examples

Example 1:
["FeedbackFlightNegativeHeightTooHigh"] call BIS_fnc_genericSentence;
Example 2:
["FeedbackFlightNegativeSpeedTooSlow",nil,5,true] call BIS_fnc_genericSentence;

Additional Information

See also:
Generic Sentences

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