kbWasSaid: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "[[Category:Scripting_Commands_Take_On_Helicopters" to "[[Category:Scripting Commands Take On Helicopters")
m (Some wiki formatting)
 
(38 intermediate revisions by 2 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


| Check if given item was said by person to someone. See [[Conversations]] for more details. |DESCRIPTION=
|game3= tkoh
____________________________________________________________________________________________
|version3= 1.00


| person [[kbWasSaid]] [receiver, topic, sentenceID, maxAge] |SYNTAX=
|game4= arma3
|version4= 0.50


|p1= person: [[Object]] - who said the item |PARAMETER1=  
|gr1= Conversations


|p2= [receiver, topic, sentenceID, maxAge]: [[Array]]  |PARAMETER2=  
|arg= global


|p3= receiver: [[Object]] - receiver of the sentence
|descr= Check if given item was said by person to someone. See [[Conversations]] for more details.


|p4= topic: [[String]] - name of the topic used in [[kbAddTopic]]
|s1= person [[kbWasSaid]] [receiver, topic, sentenceID, maxAge]


|p5= sentenceID: [[String]] - id of sentence that we want to check
|p1= person: [[Object]] - who said the item


|p6= maxAge: [[Number]] - time in seconds. [[kbWasSaid]] will check whether the sentence was said in last '''max. age''' seconds
|p2= receiver: [[Object]] - receiver of the sentence


| [[Boolean]] |RETURNVALUE=
|p3= topic: [[String]] - name of the topic used in [[kbAddTopic]]


|p4= sentenceID: [[String]] - id of sentence that we want to check


|x1= <code>[[player]] [[kbWasSaid]] [otherUnit, "myTopic", "mySentenceID", 3];</code>|EXAMPLE1=
|p6= maxAge: [[Number]] - time in seconds. [[kbWasSaid]] will check whether the sentence was said in last '''max. age''' seconds


____________________________________________________________________________________________
|r1= [[Boolean]]


| [[Conversations]], [[kbAddTopic]], [[kbHasTopic]], [[kbTell]], [[kbReact]], [[kbRemoveTopic]], [[kbAddDatabase]], [[kbAddDatabaseTargets]], [[FSM]], [[FSM Editor]] |SEEALSO=
|x1= <sqf>player kbWasSaid [otherUnit, "myTopic", "mySentenceID", 3];</sqf>


| |MPBEHAVIOUR=  
|seealso= [[Conversations]] [[kbAddTopic]] [[kbHasTopic]] [[kbTell]] [[kbReact]] [[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 16:23, 15 August 2022

Hover & click on the images for description

Description

Description:
Check if given item was said by person to someone. See Conversations for more details.
Groups:
Conversations

Syntax

Syntax:
person kbWasSaid [receiver, topic, sentenceID, maxAge]
Parameters:
person: Object - who said the item
receiver: Object - receiver of the sentence
topic: String - name of the topic used in kbAddTopic
sentenceID: String - id of sentence that we want to check
maxAge: Number - time in seconds. kbWasSaid will check whether the sentence was said in last max. age seconds
Return Value:
Boolean

Examples

Example 1:
player kbWasSaid [otherUnit, "myTopic", "mySentenceID", 3];

Additional Information

See also:
Conversations kbAddTopic kbHasTopic kbTell kbReact 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