kbTell: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(format (forceRadio is defined as optional -> no need for extra brackets))
mNo edit summary
 
(48 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[Category:Scripting Commands|KBTELL]]
{{RV|type=command
[[Category:Scripting Commands ArmA|KBTELL]]
[[Category:Scripting Commands ArmA2|KBTELL]]


{{Command|= Comments
|game1= arma2
____________________________________________________________________________________________
|version1= 1.00


| arma2 |= Game name
|game2= arma2oa
|version2= 1.50


|1.00|= Game version
|game3= tkoh
____________________________________________________________________________________________
|version3= 1.00


| Make the person tell to the receiver the sentence. |= Description
|game4= arma3
____________________________________________________________________________________________
|version4= 0.50


| person '''kbTell''' [receiver, TopicName, SentenceClass, [argumentName, argumentValue, argumentText, argumentSpeech], ...,forceRadio] |= Syntax
|gr1= Conversations


|p1= person: [[Object]] |= Parameter 1
|arg= local


|p2= [receiver, TopicName, SentenceClass, [argumentName, argumentValue, argumentText, argumentSpeech], ...,forceRadio]: [[Array]] |= Parameter 2
|eff= global


|p3= receiver: [[Object]] |= Parameter 3
|descr= Make the person tell to the receiver the sentence. See [[Conversations]] for more details.
|p4= TopicName: [[String]]  |= Parameter 4
|p5= SentenceClass: [[String]]  |= Parameter5
|p6= argumentName: [[String]]  |= Parameter6
|p7= argumentValue: [[Code]] |= Parameter 7
|p8= argumentText: [[String]] |= Parameter 8
|p9= argumentSpeech: [[Array]] of Strings - each string is an already defined word in configs. |= Parameter 9
|p10= forceRadio (optional): [[Boolean]] or [[Number]] or [[String]] - true/false to force use of radio, [[Number]] 1-10 to force use of custom radio channel, or [[String]] name of radio channel to use 'GLOBAL', 'SIDE', 'GROUP', 'VEHICLE', 'DIRECT', 'COMMAND'|= Parameter 10


| [[Nothing]] |= Return value
|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.
____________________________________________________________________________________________


| [[kbAddTopic]], [[kbHasTopic]], [[kbRemoveTopic]]  |= See also
|s1= person [[kbTell]] [receiver, topicName, sentenceClass, argumentArray1, argumentArray2, ..., forceRadio]


}}
|p1= person: [[Object]]
<pre>
 
|p2= receiver: [[Object]]
 
|p3= topicName: [[String]]
 
|p4= sentenceClass: [[String]]


// Example for kbTell with arguments, and Game-Logic as HQ.
|p5= argumentArrayN: [[Array]] - (Optional) format [argumentName, argumentValue, argumentText, argumentSpeech]:
* argumentName: [[String]]
* argumentValue: [[Code]]
* argumentText: [[String]]
* argumentSpeech: [[Array]] of [[String]]s - each string is an already defined word in config.


// In Config file
|p6= 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'


class CfgIdentities
|r1= [[Nothing]]
{
class SSMHQ
{
name = $STR_DN_WARFARE_HQ_BASE_UNFOLDED;
face = "Face97";
glasses = "None";
speaker = "MaleA0EN";
pitch = 1.0;
};
};


// IN BIKB
|x1= <sqf>player kbTell [BIS_HQ, "myTopic", "playerSentence1"];</sqf>


class Sentences
|x2= <sqf>player kbTell [
BIS_HQ, // to
"Airstrike", // topic
"AirstrikeRequest", // sentence
["Team", {}, "Anvil", ["Anvil"]], // argument 1
["Location", {}, "Strelka", ["Strelka"]], // argument 2
true]; // use radio</sqf>
in given .bikb:
<syntaxhighlight lang="cpp">
class AirstrikeRequest
{
{
class AirstrikeRequest
text = "%team requesting close air support at grid %location ";
speech[] = { %Team, RequestingCloseAirSupportAtGrid, %Location };
class Arguments
{
{
text = "%team requesting close air support at grid %location ";
class Team { type = "simple"; };
speech[]={%Team,RequestingCloseAirSupportAtGrid,%Location};
class Location { type = "simple"; };
class Arguments
{
class Team {type = "simple";};
class Location {type = "simple";};
};
};
};
};
};
</syntaxhighlight>


class Arguments{};
|x3= <sqf>player kbTell [
class Special {};
BIS_HQ, // to
"Airstrike", // topic
"AirstrikeRequest", // sentence
["argumentName", argumentValue], // argument 1
true]; // use radio</sqf>


startWithVocal[] = {};
|seealso= [[Conversations]] [[kbAddTopic]] [[kbHasTopic]] [[kbReact]] [[kbRemoveTopic]] [[kbAddDatabase]] [[kbAddDatabaseTargets]] [[FSM]] [[FSM Editor]]
startWithConsonant[] = {};
}}
 
// In Script file
 
BIS_SSM_HQWEST = (createGroup west) createUnit ["Logic", [10,10,1000], [], 0, "NONE"];
BIS_SSM_HQWEST setGroupId ["Headquaters", "SIX"];
BIS_SSM_HQWEST setIdentity "SSMHQ_EN";
 
player kbAddtopic["Airstrike", BIKB];
BIS_SSM_HQWEST kbAddtopic["Airstrike", BIKB];
player kbTell [BIS_SSM_HQWEST,"Airstrike","AirstrikeRequest", ["Team",{},"Anvil",["Anvil"]],["Location",{},"Strelka",["Strelka"]],true];
</pre>
 
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<dd class="notedate">Posted on may 02, 2010 - 13:33 GMT+1
<dt class="note">'''[[User:Lou Montana|Lou Montana]]'''
<dd class="note"> Jezuro help on BIforum : [http://forums.bistudio.com/showthread.php?t=91875]  
<!-- Note Section END -->
</dl>
 
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]

Latest revision as of 12:01, 27 November 2023

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