kbReact: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Fix categories)
(*finally* understood what this command does! Add description and example)
Line 5: Line 5:


|1.00|= Game version
|1.00|= Game version
|arg= global |= Arguments in MP
|eff= local |= Effects in MP
____________________________________________________________________________________________
____________________________________________________________________________________________


| Pass a non-verbal communication to the receiver. See [[Conversations]] for more details. |= Description
| Pass a non-verbal communication to the receiver. This command does '''as if''' the sentence was said and triggers the reaction scripts (AI FSM or player's conversation EH). See [[Conversations]] for more details. |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| person [[kbReact]] [receiver, topic, sentenceID, [argumentName, argumentValue, argumentText, argumentSpeech], …] |= Syntax
| person [[kbReact]] [receiver, topicName, sentenceID(, argumentArray1, argumentArray2, …)] |= Syntax
 
|p1= person: [[Object]] |= Parameter 1
 
|p2= [receiver, topicName, sentenceID, argumentArray1, argumentArray2, …]: [[Array]] |= Parameter 2


|p1= person: [[Object]] |= PARAMETER1
|p3= receiver: [[Object]] |= Parameter 3


|p2= [receiver, topic, sentenceID, [argumentName, argumentValue, argumentText, argumentSpeech], …]: [[Array]] |= PARAMETER2
|p4= topicName: [[String]] |= Parameter 4


| [[Nothing]] |= RETURNVALUE
|p5= sentenceID: [[String]] |= Parameter 5


|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


|x1= <code>(example)</code>|= EXAMPLE1
| [[Nothing]] |= Return value
 
|x1= <code>unit1 [[kbReact]] [unit2, "topicName", "speech1"];
{{codecomment|will trigger '''as if''' unit1 said the sentence (''via'' [[kbTell]])
// unit2's FSM will [[kbReact|react]] accordingly.}}</code>|= Example 1


____________________________________________________________________________________________
____________________________________________________________________________________________


| [[Conversations]], [[kbAddTopic]], [[kbHasTopic]], [[kbTell]], [[kbWasSaid]], [[kbRemoveTopic]], [[kbAddDatabase]], [[kbAddDatabaseTargets]], [[FSM]], [[FSM Editor]] |= SEEALSO
| [[Conversations]], [[kbAddTopic]], [[kbHasTopic]], [[kbTell]], [[kbWasSaid]], [[kbRemoveTopic]], [[kbAddDatabase]], [[kbAddDatabaseTargets]], [[FSM]], [[FSM Editor]] |= See also
 
|  |= MPBEHAVIOUR
____________________________________________________________________________________________
____________________________________________________________________________________________
}}
}}

Revision as of 22:32, 9 April 2018

Hover & click on the images for description

Description

Description:
Pass a non-verbal communication to the receiver. This command does as if the sentence was said and triggers the reaction scripts (AI FSM or player's conversation EH). See Conversations for more details.
Groups:
Uncategorised

Syntax

Syntax:
person kbReact [receiver, topicName, sentenceID(, argumentArray1, argumentArray2, …)]
Parameters:
person: Object
[receiver, topicName, sentenceID, argumentArray1, argumentArray2, …]: Array
receiver: Object
topicName: String
sentenceID: 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.
Return Value:
Nothing

Examples

Example 1:
unit1 kbReact [unit2, "topicName", "speech1"]; will trigger as if unit1 said the sentence (via kbTell) // unit2's FSM will react accordingly.

Additional Information

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

Bottom Section