kbTell: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<code>([^ ]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^ ]*)<\/code>" to "<code>$1$2$3</code>") |
Lou Montana (talk | contribs) m (Text replacement - "<sqf>([^↵][^<]*↵[^<]*)<\/sqf>" to "<sqf> $1 </sqf>") |
||
(9 intermediate revisions by 2 users not shown) | |||
Line 23: | Line 23: | ||
|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. | |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. | ||
|s1= person [[kbTell]] [receiver, topicName, sentenceClass, argumentArray1, argumentArray2, | |s1= person [[kbTell]] [receiver, topicName, sentenceClass, argumentArray1, argumentArray2, ..., forceRadio] | ||
|p1= person: [[Object]] | |p1= person: [[Object]] | ||
Line 33: | Line 33: | ||
|p4= sentenceClass: [[String]] | |p4= sentenceClass: [[String]] | ||
|p5= | |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 | * argumentSpeech: [[Array]] of [[String]]s - each string is an already defined word in config. | ||
|p6= forceRadio: [[Boolean]], [[Number]] or [[String]] (''last value of the array'') - (Optional) | |p6= forceRadio: [[Boolean]], [[Number]] or [[String]] (''last value of the array'') - (Optional) | ||
Line 44: | Line 44: | ||
* [[String]] name of radio channel to use, from: 'GLOBAL', 'SIDE', 'GROUP', 'VEHICLE', 'DIRECT', 'COMMAND' | * [[String]] name of radio channel to use, from: 'GLOBAL', 'SIDE', 'GROUP', 'VEHICLE', 'DIRECT', 'COMMAND' | ||
|x1= < | |r1= [[Nothing]] | ||
|x1= <sqf>player kbTell [BIS_HQ, "myTopic", "playerSentence1"];</sqf> | |||
|x2= < | |x2= <sqf> | ||
BIS_HQ, | player kbTell [ | ||
"Airstrike", | BIS_HQ, // to | ||
"AirstrikeRequest", | "Airstrike", // topic | ||
["Team", {}, "Anvil", ["Anvil"]], | "AirstrikeRequest", // sentence | ||
["Location", {}, "Strelka", ["Strelka"]], | ["Team", {}, "Anvil", ["Anvil"]], // argument 1 | ||
true]; | ["Location", {}, "Strelka", ["Strelka"]], // argument 2 | ||
true]; // use radio | |||
</sqf> | |||
in given .bikb: | in given .bikb: | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
Line 67: | Line 71: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|x3= < | |x3= <sqf> | ||
BIS_HQ, | player kbTell [ | ||
"Airstrike", | BIS_HQ, // to | ||
"AirstrikeRequest", | "Airstrike", // topic | ||
["argumentName", argumentValue], | "AirstrikeRequest", // sentence | ||
true]; | ["argumentName", argumentValue], // argument 1 | ||
true]; // use radio | |||
</sqf> | |||
|seealso= [[Conversations]] [[kbAddTopic]] [[kbHasTopic]] [[kbReact]] [[kbRemoveTopic]] [[kbAddDatabase]] [[kbAddDatabaseTargets]] [[FSM]] [[FSM Editor]] | |seealso= [[Conversations]] [[kbAddTopic]] [[kbHasTopic]] [[kbReact]] [[kbRemoveTopic]] [[kbAddDatabase]] [[kbAddDatabaseTargets]] [[FSM]] [[FSM Editor]] | ||
}} | }} |
Latest revision as of 19:43, 3 September 2024
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]:
- forceRadio: Boolean, Number or String (last value of the array) - (Optional)
- Return Value:
- Nothing
Examples
- Example 1:
- Example 2:
- 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:
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