kbReact: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "Category:Scripting Commands ArmA2" to "Category:Scripting Commands Arma 2")
mNo edit summary
 
(42 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma2 |Game name=
|game1= arma2
|version1= 1.00


|1.00|Game version=
|game2= arma2oa
|version2= 1.50


|arg= global |Arguments in MP=
|game3= tkoh
|version3= 1.00


|eff= local |Effects in MP=
|game4= arma3
____________________________________________________________________________________________
|version4= 0.50


| 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=
|gr1= Conversations
____________________________________________________________________________________________


| person [[kbReact]] [receiver, topicName, sentenceID(, argumentArray1, argumentArray2, …)] |SYNTAX=
|arg= global


|p1= person: [[Object]] |PARAMETER1=
|eff= local


|p2= [receiver, topicName, sentenceID, argumentArray1, argumentArray2, …]: [[Array]] |PARAMETER2=
|descr= 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.


|p3= receiver: [[Object]] |PARAMETER3=
|s1= person [[kbReact]] [receiver, topicName, sentenceID, argumentArray1, argumentArray2, ...]


|p4= topicName: [[String]] |PARAMETER4=
|p1= person: [[Object]]


|p5= sentenceID: [[String]] |PARAMETER5=
|p2= receiver: [[Object]]


|p6= argumentArray1toN (Optional): [[Array]] - [argumentName, argumentValue, argumentText, argumentSpeech]:
|p3= topicName: [[String]]
 
|p4= sentenceID: [[String]]
 
|p5= argumentArrayN: [[Array]] - (Optional) in format [argumentName, argumentValue, argumentText, argumentSpeech]:
* argumentName: [[String]]
* argumentName: [[String]]
* argumentValue: [[Code]]
* argumentValue: [[Code]]
* argumentText: [[String]]
* argumentText: [[String]]
* argumentSpeech: [[Array]] of [[String|Strings]] - each string is an already defined word in config. |PARAMETER6=
* argumentSpeech: [[Array]] of [[String]]s - each string is an already defined word in config.
 
| [[Nothing]] |RETURNVALUE=


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


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


| [[Conversations]], [[kbAddTopic]], [[kbHasTopic]], [[kbTell]], [[kbWasSaid]], [[kbRemoveTopic]], [[kbAddDatabase]], [[kbAddDatabaseTargets]], [[FSM]], [[FSM Editor]] |SEEALSO=
|seealso= [[Conversations]] [[kbAddTopic]] [[kbHasTopic]] [[kbTell]] [[kbWasSaid]] [[kbRemoveTopic]] [[kbAddDatabase]] [[kbAddDatabaseTargets]] [[FSM]] [[FSM Editor]]
____________________________________________________________________________________________
}}
}}
<h3 style='display:none'>Notes</h3>
<dl class='command_description'>
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style='display:none'>Bottom Section</h3>
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Command Group: Conversations|{{uc:{{PAGENAME}}}}]]

Latest revision as of 05:58, 27 November 2023

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