kbReact: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|x([0-9])= *<code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>")
m (Some wiki formatting)
Line 25: Line 25:
|p1= person: [[Object]]
|p1= person: [[Object]]


|p2= [receiver, topicName, sentenceID, argumentArray1, argumentArray2, …]: [[Array]]
|p2= receiver: [[Object]]


|p3= receiver: [[Object]]
|p3= topicName: [[String]]


|p4= topicName: [[String]]
|p4= sentenceID: [[String]]


|p5= sentenceID: [[String]]
|p5= argumentArray1toN: [[Array]] - (Optional) in format [argumentName, argumentValue, argumentText, argumentSpeech]:
 
|p6= argumentArray1toN (Optional): [[Array]] - [argumentName, argumentValue, argumentText, argumentSpeech]:
* argumentName: [[String]]
* argumentName: [[String]]
* argumentValue: [[Code]]
* argumentValue: [[Code]]
Line 41: Line 39:
|r1= [[Nothing]]
|r1= [[Nothing]]


|x1= <sqf>// will trigger '''as if''' unit1 said the sentence (''via'' kbTell)
|x1= <sqf>
// will trigger AS IF unit1 said the sentence (via kbTell)
// unit2's FSM will react accordingly.
// unit2's FSM will react accordingly.
unit1 kbReact [unit2, "topicName", "speech1"];</sqf>
unit1 kbReact [unit2, "topicName", "speech1"];
</sqf>


|seealso= [[Conversations]] [[kbAddTopic]] [[kbHasTopic]] [[kbTell]] [[kbWasSaid]] [[kbRemoveTopic]] [[kbAddDatabase]] [[kbAddDatabaseTargets]] [[FSM]] [[FSM Editor]]
|seealso= [[Conversations]] [[kbAddTopic]] [[kbHasTopic]] [[kbTell]] [[kbWasSaid]] [[kbRemoveTopic]] [[kbAddDatabase]] [[kbAddDatabaseTargets]] [[FSM]] [[FSM Editor]]
}}
}}

Revision as of 13:51, 22 May 2022

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:
Conversations

Syntax

Syntax:
person kbReact [receiver, topicName, sentenceID(, argumentArray1, argumentArray2, …)]
Parameters:
person: Object
receiver: Object
topicName: String
sentenceID: String
argumentArray1toN: Array - (Optional) in format [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:
// 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:
Conversations kbAddTopic kbHasTopic kbTell kbWasSaid 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