kbReact: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) (*finally* understood what this command does! Add description and example) |
m (template:command argument fix) |
||
Line 11: | Line 11: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| 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. |= | | 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, topicName, sentenceID(, argumentArray1, argumentArray2, …)] |= | | person [[kbReact]] [receiver, topicName, sentenceID(, argumentArray1, argumentArray2, …)] |SYNTAX= | ||
|p1= person: [[Object]] |= | |p1= person: [[Object]] |PARAMETER1= | ||
|p2= [receiver, topicName, sentenceID, argumentArray1, argumentArray2, …]: [[Array]] |= | |p2= [receiver, topicName, sentenceID, argumentArray1, argumentArray2, …]: [[Array]] |PARAMETER2= | ||
|p3= receiver: [[Object]] |= | |p3= receiver: [[Object]] |PARAMETER3= | ||
|p4= topicName: [[String]] |= | |p4= topicName: [[String]] |PARAMETER4= | ||
|p5= sentenceID: [[String]] |= | |p5= sentenceID: [[String]] |PARAMETER5= | ||
|p6= argumentArray1toN (Optional): [[Array]] - [argumentName, argumentValue, argumentText, argumentSpeech]: | |p6= argumentArray1toN (Optional): [[Array]] - [argumentName, argumentValue, argumentText, argumentSpeech]: | ||
Line 30: | Line 30: | ||
* argumentValue: [[Code]] | * argumentValue: [[Code]] | ||
* argumentText: [[String]] | * argumentText: [[String]] | ||
* argumentSpeech: [[Array]] of [[String|Strings]] - each string is an already defined word in config. |= | * argumentSpeech: [[Array]] of [[String|Strings]] - each string is an already defined word in config. |PARAMETER6= | ||
| [[Nothing]] |= | | [[Nothing]] |RETURNVALUE= | ||
|x1= <code>unit1 [[kbReact]] [unit2, "topicName", "speech1"]; | |x1= <code>unit1 [[kbReact]] [unit2, "topicName", "speech1"]; | ||
{{codecomment|will trigger '''as if''' unit1 said the sentence (''via'' [[kbTell]]) | {{codecomment|will trigger '''as if''' unit1 said the sentence (''via'' [[kbTell]]) | ||
// unit2's FSM will [[kbReact|react]] accordingly.}}</code>|= | // unit2's FSM will [[kbReact|react]] accordingly.}}</code>|EXAMPLE1= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| [[Conversations]], [[kbAddTopic]], [[kbHasTopic]], [[kbTell]], [[kbWasSaid]], [[kbRemoveTopic]], [[kbAddDatabase]], [[kbAddDatabaseTargets]], [[FSM]], [[FSM Editor]] |= | | [[Conversations]], [[kbAddTopic]], [[kbHasTopic]], [[kbTell]], [[kbWasSaid]], [[kbRemoveTopic]], [[kbAddDatabase]], [[kbAddDatabaseTargets]], [[FSM]], [[FSM Editor]] |SEEALSO= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
}} | }} |
Revision as of 14:42, 7 April 2019
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]:
- 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
Categories:
- Scripting Commands
- Introduced with Arma 2 version 1.00
- Arma 2: New Scripting Commands
- Arma 2: Scripting Commands
- Command Group: Uncategorised
- Scripting Commands: Local Effect
- ArmA 2: New Scripting Commands List
- Scripting Commands ArmA2
- Scripting Commands Arma 3
- Scripting Commands Take On Helicopters
- Command Group: Conversations