kbWasSaid: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
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...)
m (Some wiki formatting)
 
(30 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command
{{RV|type=command


| arma2
|game1= arma2
|version1= 1.00


|gr1= Conversations
|game2= arma2oa
|version2= 1.50


|game3= tkoh
|version3= 1.00


|game4= arma3
|version4= 0.50


|1.00
|gr1= Conversations


|arg= global |MP arguments=
|arg= global


| Check if given item was said by person to someone. See [[Conversations]] for more details.
|descr= Check if given item was said by person to someone. See [[Conversations]] for more details.


| person [[kbWasSaid]] [receiver, topic, sentenceID, maxAge]
|s1= person [[kbWasSaid]] [receiver, topic, sentenceID, maxAge]


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


|p2= [receiver, topic, sentenceID, maxAge]: [[Array]]
|p2= receiver: [[Object]] - receiver of the sentence
 
|p3= receiver: [[Object]] - receiver of the sentence


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


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


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


| [[Boolean]]
|r1= [[Boolean]]
 
|x1= <code>[[player]] [[kbWasSaid]] [otherUnit, "myTopic", "mySentenceID", 3];</code>


| [[Conversations]], [[kbAddTopic]], [[kbHasTopic]], [[kbTell]], [[kbReact]], [[kbRemoveTopic]], [[kbAddDatabase]], [[kbAddDatabaseTargets]], [[FSM]], [[FSM Editor]]
|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>
{{GameCategory|arma2|Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|tkoh|Scripting Commands}}

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