kbHasTopic: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Add to Conversations command group + added examples)
Line 1: Line 1:
[[Category:Scripting Commands|KBHASTOPIC]]
[[Category:Scripting Commands ArmA|KBHASTOPIC]]
[[Category:Scripting Commands ArmA2|KBHASTOPIC]]
{{Command|= Comments
{{Command|= Comments
____________________________________________________________________________________________
____________________________________________________________________________________________
Line 14: Line 10:
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[Boolean]] <nowiki>=</nowiki> person '''kbHasTopic''' TopicName|= Syntax
| _unit [[kbHasTopic]] TopicName |= Syntax


|p1= person: [[Object]] |= Parameter 1
|p1= person: [[Object]] |= Parameter 1
Line 21: Line 17:


| [[Boolean]] |= Return value
| [[Boolean]] |= Return value
|x1= <code>_obiHasTopic = [[player]] [[kbHasTopic]] "helloThereGeneralK";</code> |= Example 1
|x2= <code>if ([[player]] [[kbHasTopic]] "dontShoot") then { [[player]] [[kbRemoveTopic]] "dontShoot"; };</code> |= Example 2
____________________________________________________________________________________________
____________________________________________________________________________________________


| |= See also
| [[kbAddTopic]], [[kbRemoveTopic]], [[kbTell]], [[FSM]] |= See also


}}
}}
Line 35: Line 35:


<h3 style="display:none">Bottom Section</h3>
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Command Group: Conversations|{{uc:{{PAGENAME}}}}]]

Revision as of 22:05, 26 March 2018

Hover & click on the images for description

Description

Description:
Check if conversation topic was registered to given person.
Groups:
Uncategorised

Syntax

Syntax:
_unit kbHasTopic TopicName
Parameters:
person: Object
TopicName: String
Return Value:
Boolean

Examples

Example 1:
_obiHasTopic = player kbHasTopic "helloThereGeneralK";
Example 2:
if (player kbHasTopic "dontShoot") then { player kbRemoveTopic "dontShoot"; };

Additional Information

See also:
kbAddTopickbRemoveTopickbTellFSM

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

Notes

Bottom Section