kbReact: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| arma2 | | arma2 | ||
|gr1= Conversations | |gr1= Conversations | ||
|1.00 | |1.00 | ||
|arg= global |Arguments in MP= | |arg= global |Arguments in MP= | ||
Line 13: | Line 13: | ||
|eff= local |Effects in MP= | |eff= local |Effects in MP= | ||
| 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. | ||
| person [[kbReact]] [receiver, topicName, sentenceID(, argumentArray1, argumentArray2, …)] | | person [[kbReact]] [receiver, topicName, sentenceID(, argumentArray1, argumentArray2, …)] | ||
|p1= person: [[Object]] | |p1= person: [[Object]] | ||
|p2= [receiver, topicName, sentenceID, argumentArray1, argumentArray2, …]: [[Array]] | |p2= [receiver, topicName, sentenceID, argumentArray1, argumentArray2, …]: [[Array]] | ||
|p3= receiver: [[Object]] | |p3= receiver: [[Object]] | ||
|p4= topicName: [[String]] | |p4= topicName: [[String]] | ||
|p5= sentenceID: [[String]] | |p5= sentenceID: [[String]] | ||
|p6= argumentArray1toN (Optional): [[Array]] - [argumentName, argumentValue, argumentText, argumentSpeech]: | |p6= argumentArray1toN (Optional): [[Array]] - [argumentName, argumentValue, argumentText, argumentSpeech]: | ||
Line 31: | Line 31: | ||
* 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. | ||
| [[Nothing]] | | [[Nothing]] | ||
|x1= <code>{{codecomment|// will trigger '''as if''' unit1 said the sentence (''via'' [[kbTell]]) | |x1= <code>{{codecomment|// will trigger '''as if''' unit1 said the sentence (''via'' [[kbTell]]) | ||
// unit2's FSM will [[kbReact|react]] accordingly.}} | // unit2's FSM will [[kbReact|react]] accordingly.}} | ||
unit1 [[kbReact]] [unit2, "topicName", "speech1"];</code> | unit1 [[kbReact]] [unit2, "topicName", "speech1"];</code> | ||
| [[Conversations]], [[kbAddTopic]], [[kbHasTopic]], [[kbTell]], [[kbWasSaid]], [[kbRemoveTopic]], [[kbAddDatabase]], [[kbAddDatabaseTargets]], [[FSM]], [[FSM Editor]] | | [[Conversations]], [[kbAddTopic]], [[kbHasTopic]], [[kbTell]], [[kbWasSaid]], [[kbRemoveTopic]], [[kbAddDatabase]], [[kbAddDatabaseTargets]], [[FSM]], [[FSM Editor]] | ||
}} | }} | ||
Revision as of 01:02, 18 January 2021
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:
- Conversations
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:
// will trigger as if unit1 said the sentence (via kbTell) // unit2's FSM will react accordingly. unit1 kbReact [unit2, "topicName", "speech1"];
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