kbTell: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{uc:{{PAGENAME}}}}" to "")
m (Text replacement - "<sqf>([^↵][^<]*↵[^<]*)<\/sqf>" to "<sqf> $1 </sqf>")
 
(38 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma2 |Game name=
|game1= arma2
|version1= 1.00


|1.00|Game version=
|game2= arma2oa
|version2= 1.50


|arg= loc |arguments=
|game3= tkoh
|version3= 1.00


|eff= glob |effect=
|game4= arma3
____________________________________________________________________________________________
|version4= 0.50


| Make the person tell to the receiver the sentence. See [[Conversations]] for more details. |Description=
|gr1= Conversations


|pr= Two units cannot talk on the same channel at the same time, this can lead to weird effects for non-local listeners; make sure not to use the same channel at the same time in multiplayer. [[radioChannelCreate|Custom channels]] are considered as one channel for this matter. |Problem=
|arg= local
____________________________________________________________________________________________


| person [[kbTell]] [receiver, topicName, sentenceClass(, argumentArray1, argumentArray2, (…), forceRadio)] |Syntax=
|eff= global


|p1= person: [[Object]] |Parameter 1=
|descr= Make the person tell to the receiver the sentence. See [[Conversations]] for more details.


|p2= [receiver, topicName, sentenceClass, argumentArray1, argumentArray2, (…), forceRadio]: [[Array]] |Parameter 2=
|pr= Two units cannot talk on the same channel at the same time, this can lead to weird effects for non-local listeners; make sure not to use the same channel at the same time in multiplayer. [[radioChannelCreate|Custom channels]] are considered as one channel for this matter.


|p3= receiver: [[Object]] |Parameter 3=
|s1= person [[kbTell]] [receiver, topicName, sentenceClass, argumentArray1, argumentArray2, ..., forceRadio]


|p4= topicName: [[String]] |Parameter 4=
|p1= person: [[Object]]


|p5= sentenceClass: [[String]] |Parameter 5=
|p2= receiver: [[Object]]


|p6= argumentArray1toN (Optional): [[Array]] - [argumentName, argumentValue, argumentText, argumentSpeech]:
|p3= topicName: [[String]]
 
|p4= sentenceClass: [[String]]
 
|p5= argumentArrayN: [[Array]] - (Optional) format [argumentName, argumentValue, argumentText, argumentSpeech]:
* argumentName: [[String]]
* argumentName: [[String]]
* argumentValue: [[Code]]
* argumentValue: [[Code]]
* argumentText: [[String]]
* argumentText: [[String]]
* argumentSpeech: [[Array]] of [[String|Strings]] - each string is an already defined word in config. |Parameter 6=
* argumentSpeech: [[Array]] of [[String]]s - each string is an already defined word in config.


|p7= forceRadio (Optional): [[Boolean]], [[Number]] or [[String]] (''last value of the array'')
|p6= forceRadio: [[Boolean]], [[Number]] or [[String]] (''last value of the array'') - (Optional)
* [[Boolean]] true/false to force use of radio
* [[Boolean]] true/false to force use of radio
* [[Number]] 1-10 to force use of custom radio channel
* [[Number]] 1-10 to force use of custom radio channel
* [[String]] name of radio channel to use, from: 'GLOBAL', 'SIDE', 'GROUP', 'VEHICLE', 'DIRECT', 'COMMAND' |Parameter 7=
* [[String]] name of radio channel to use, from: 'GLOBAL', 'SIDE', 'GROUP', 'VEHICLE', 'DIRECT', 'COMMAND'
____________________________________________________________________________________________
 
|r1= [[Nothing]]


|x1= <code>[[player]] [[kbTell]] [BIS_HQ, "myTopic", "playerSentence1"];</code> |Example 1=
|x1= <sqf>player kbTell [BIS_HQ, "myTopic", "playerSentence1"];</sqf>


|x2= <code>[[player]] [[kbTell]] [
|x2= <sqf>
BIS_HQ, {{cc|to}}
player kbTell [
"Airstrike", {{cc|topic}}
BIS_HQ, // to
"AirstrikeRequest", {{cc|sentence}}
"Airstrike", // topic
["Team", {}, "Anvil", ["Anvil"]], {{cc|argument 1}}
"AirstrikeRequest", // sentence
["Location", {}, "Strelka", ["Strelka"]], {{cc|argument 2}}
["Team", {}, "Anvil", ["Anvil"]], // argument 1
true]; {{cc|use radio}}</code>
["Location", {}, "Strelka", ["Strelka"]], // argument 2
true]; // use radio
</sqf>
in given .bikb:
in given .bikb:
<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">
Line 61: Line 69:
};
};
};
};
</syntaxhighlight> |Example 2=
</syntaxhighlight>


|x3= <code>[[player]] [[kbTell]] [
|x3= <sqf>
BIS_HQ, {{cc|to}}
player kbTell [
"Airstrike", {{cc|topic}}
BIS_HQ, // to
"AirstrikeRequest", {{cc|sentence}}
"Airstrike", // topic
["argumentName", argumentValue], {{cc|argument 1}}
"AirstrikeRequest", // sentence
true]; {{cc|use radio}}</code> |Example 3=
["argumentName", argumentValue], // argument 1
 
true]; // use radio
| [[Nothing]] |Return value=
</sqf>
____________________________________________________________________________________________
 
| [[Conversations]], [[kbAddTopic]], [[kbHasTopic]], [[kbReact]], [[kbRemoveTopic]], [[kbAddDatabase]], [[kbAddDatabaseTargets]], [[FSM]], [[FSM Editor]]  |See also=


|seealso= [[Conversations]] [[kbAddTopic]] [[kbHasTopic]] [[kbReact]] [[kbRemoveTopic]] [[kbAddDatabase]] [[kbAddDatabaseTargets]] [[FSM]] [[FSM Editor]]
}}
}}
<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:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]

Latest revision as of 19:43, 3 September 2024

Hover & click on the images for description

Description

Description:
Make the person tell to the receiver the sentence. See Conversations for more details.
Problems:
Two units cannot talk on the same channel at the same time, this can lead to weird effects for non-local listeners; make sure not to use the same channel at the same time in multiplayer. Custom channels are considered as one channel for this matter.
Groups:
Conversations

Syntax

Syntax:
person kbTell [receiver, topicName, sentenceClass, argumentArray1, argumentArray2, ..., forceRadio]
Parameters:
person: Object
receiver: Object
topicName: String
sentenceClass: String
argumentArrayN: Array - (Optional) format [argumentName, argumentValue, argumentText, argumentSpeech]:
  • argumentName: String
  • argumentValue: Code
  • argumentText: String
  • argumentSpeech: Array of Strings - each string is an already defined word in config.
forceRadio: Boolean, Number or String (last value of the array) - (Optional)
  • Boolean true/false to force use of radio
  • Number 1-10 to force use of custom radio channel
  • String name of radio channel to use, from: 'GLOBAL', 'SIDE', 'GROUP', 'VEHICLE', 'DIRECT', 'COMMAND'
Return Value:
Nothing

Examples

Example 1:
player kbTell [BIS_HQ, "myTopic", "playerSentence1"];
Example 2:
player kbTell [ BIS_HQ, // to "Airstrike", // topic "AirstrikeRequest", // sentence ["Team", {}, "Anvil", ["Anvil"]], // argument 1 ["Location", {}, "Strelka", ["Strelka"]], // argument 2 true]; // use radio
in given .bikb:
class AirstrikeRequest 
{
	text = "%team requesting close air support at grid %location ";
	speech[] = { %Team, RequestingCloseAirSupportAtGrid, %Location };
	class Arguments 
	{
		class Team		{ type = "simple"; };
		class Location	{ type = "simple"; };
	};
};
Example 3:
player kbTell [ BIS_HQ, // to "Airstrike", // topic "AirstrikeRequest", // sentence ["argumentName", argumentValue], // argument 1 true]; // use radio

Additional Information

See also:
Conversations kbAddTopic kbHasTopic kbReact kbRemoveTopic kbAddDatabase kbAddDatabaseTargets FSM FSM Editor

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