kbTell: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Add Conversations link & some fixes)
m (Fix examples)
Line 10: Line 10:
____________________________________________________________________________________________
____________________________________________________________________________________________


| person [[kbTell]] [receiver, topicName, sentenceClass, [argumentName, argumentValue, argumentText, argumentSpeech], (…) , forceRadio] |= Syntax
| person [[kbTell]] [receiver, topicName, sentenceClass(, argumentArray1, argumentArray2, (…), forceRadio)] |= Syntax


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


|p2= [receiver, TopicName, SentenceClass, [argumentName, argumentValue, argumentText, argumentSpeech], ...,forceRadio]: [[Array]] |= Parameter 2
|p2= [receiver, topicName, sentenceClass, argumentArray1, argumentArray2, (…), forceRadio]: [[Array]] |= Parameter 2


|p3= receiver: [[Object]] |= Parameter 3
|p3= receiver: [[Object]] |= Parameter 3
Line 20: Line 20:
|p4= topicName: [[String]] |= Parameter 4
|p4= topicName: [[String]] |= Parameter 4


|p5= sentenceClass: [[String]] |= Parameter5
|p5= sentenceClass: [[String]] |= Parameter 5


|p6= argumentName: [[String]] |= Parameter6
|p6= argumentArray1toN (Optional): [[Array]] - [argumentName, argumentValue, argumentText, argumentSpeech]:
* argumentName: [[String]]
* argumentValue: [[Code]]
* argumentText: [[String]]
* argumentSpeech: [[Array]] of [[String|Strings]] - each string is an already defined word in config. |= Parameter 6


|p7= argumentValue: [[Code]] |= Parameter 7
|p7= forceRadio (Optional): [[Boolean]], [[Number]] or [[String]] (''last value of the array'')
 
|p8= argumentText: [[String]] |= Parameter 8
 
|p9= argumentSpeech: [[Array]] of [[String|Strings]] - each string is an already defined word in configs. |= Parameter 9
 
|p10= forceRadio (optional): [[Boolean]], [[Number]] or [[String]]
* [[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 10
* [[String]] name of radio channel to use, from: 'GLOBAL', 'SIDE', 'GROUP', 'VEHICLE', 'DIRECT', 'COMMAND' |= Parameter 7
____________________________________________________________________________________________


|x1= <code>// In Config file
|x1= <code>[[player]] [[kbTell]] [BIS_HQ, "myTopic", "playerSentence1"];</code> |= Example 1
class CfgIdentities
 
{
|x2= <code>[[player]] [[kbTell]] [
class SSMHQ
BIS_HQ, {{codecomment|// to}}
{
"Airstrike", {{codecomment|// topic}}
name = $STR_DN_WARFARE_HQ_BASE_UNFOLDED;
"AirstrikeRequest", {{codecomment|// sentence}}
face = "Face97";
["Team", {}, "Anvil", ["Anvil"]], {{codecomment|// argument 1}}
glasses = "None";
["Location", {}, "Strelka", ["Strelka"]], {{codecomment|// argument 2}}
speaker = "MaleA0EN";
true]; {{codecomment|// use radio}}
pitch = 1.0;
{{codecomment|
};
// bikb reference:
};
/*
// IN BIKB
class AirstrikeRequest
class Sentences
{
{
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"; };
};
};
};
};
};*/}}
 
class Arguments {};
class Special {};
 
startWithVocal[] = {};
startWithConsonant[] = {};
 
// In Script file
BIS_SSM_HQWEST = (createGroup west) createUnit ["Logic", [10,10,1000], [], 0, "NONE"];//Game Logic as HQ
BIS_SSM_HQWEST setGroupId ["Headquarters", "SIX"];
BIS_SSM_HQWEST setIdentity "SSMHQ_EN";


player kbAddtopic ["Airstrike", BIKB];
</code> |= Example 2
BIS_SSM_HQWEST kbAddtopic ["Airstrike", BIKB];
player kbTell [BIS_SSM_HQWEST, "Airstrike", "AirstrikeRequest", ["Team", {}, "Anvil", ["Anvil"]], ["Location", {}, "Strelka", ["Strelka"]], true];</code> |= Example 1


| [[Nothing]] |= Return value
| [[Nothing]] |= Return value

Revision as of 02:02, 4 April 2018

Hover & click on the images for description

Description

Description:
Make the person tell to the receiver the sentence. See Conversations for more details.
Groups:
Uncategorised

Syntax

Syntax:
person kbTell [receiver, topicName, sentenceClass(, argumentArray1, argumentArray2, (…), forceRadio)]
Parameters:
person: Object
[receiver, topicName, sentenceClass, argumentArray1, argumentArray2, (…), forceRadio]: Array
receiver: Object
topicName: String
sentenceClass: String
argumentArray1toN (Optional): Array - [argumentName, argumentValue, argumentText, argumentSpeech]:
  • argumentName: String
  • argumentValue: Code
  • argumentText: String
  • argumentSpeech: Array of Strings - each string is an already defined word in config.
forceRadio (Optional): Boolean, Number or String (last value of the array)
  • 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 // bikb reference: /* 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"; }; }; };*/

Additional Information

See also:
ConversationskbAddTopickbHasTopickbReactkbRemoveTopickbAddDatabasekbAddDatabaseTargetsFSMFSM 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

Notes

Posted on may 02, 2010 - 13:33 GMT+1
Lou Montana
Jezuro's helping topic on BIforum : link

Bottom Section