kbReact: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
 
(51 intermediate revisions by 6 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


| Pass a non-verbal communication to the receiver.  |= Description
|game3= tkoh
____________________________________________________________________________________________
|version3= 1.00


| person '''kbReact''' [receiver,topic,sentence id,[argument name,argument value,argument text,argument speech],...] |= Syntax
|game4= arma3
|version4= 0.50


|p1= person:  -  |= PARAMETER1
|gr1= Conversations


|p2= [receiver,topic,sentence id,[argument name,argument value,argument text,argument speech],...]: Array -  |= PARAMETER2
|arg= global


|p3= |= PARAMETER3
|eff= local


| [[Nothing]] |= RETURNVALUE
|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.


|s1= person [[kbReact]] [receiver, topicName, sentenceID, argumentArray1, argumentArray2, ...]


|x1= <code>(example)</code>|= EXAMPLE1
|p1= person: [[Object]]


____________________________________________________________________________________________
|p2= receiver: [[Object]]


| |= SEEALSO
|p3= topicName: [[String]]


| |= MPBEHAVIOUR
|p4= sentenceID: [[String]]
____________________________________________________________________________________________
 
}}
|p5= argumentArrayN: [[Array]] - (Optional) in format [argumentName, argumentValue, argumentText, argumentSpeech]:
* argumentName: [[String]]
* argumentValue: [[Code]]
* argumentText: [[String]]
* argumentSpeech: [[Array]] of [[String]]s - each string is an already defined word in config.


<h3 style='display:none'>Notes</h3>
|r1= [[Nothing]]
<dl class='command_description'>
<!-- Note Section BEGIN -->


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


<h3 style='display:none'>Bottom Section</h3>
|seealso= [[Conversations]] [[kbAddTopic]] [[kbHasTopic]] [[kbTell]] [[kbWasSaid]] [[kbRemoveTopic]] [[kbAddDatabase]] [[kbAddDatabaseTargets]] [[FSM]] [[FSM Editor]]
[[Category:ArmA 2: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]
}}
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{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