kbHasTopic: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Fix categories)
m (template:command argument fix)
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Check if conversation topic was registered to given person. See [[Conversations]] for more details. |= Description
| Check if conversation topic was registered to given person. See [[Conversations]] for more details. |DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


| person [[kbHasTopic]] topicName |= Syntax
| person [[kbHasTopic]] topicName |SYNTAX=


|p1= person: [[Object]] |= Parameter 1
|p1= person: [[Object]] |PARAMETER1=


|p2= topicName: [[String]] |= Parameter 2
|p2= topicName: [[String]] |PARAMETER2=


| [[Boolean]] |= Return value
| [[Boolean]] |RETURNVALUE=


|x1= <code>_obiHasTopic = [[player]] [[kbHasTopic]] "helloThereGeneralK";</code> |= Example 1
|x1= <code>_obiHasTopic = [[player]] [[kbHasTopic]] "helloThereGeneralK";</code> |EXAMPLE1=


|x2= <code>if ([[player]] [[kbHasTopic]] "dontShoot") then { [[player]] [[kbRemoveTopic]] "dontShoot"; };</code> |= Example 2
|x2= <code>if ([[player]] [[kbHasTopic]] "dontShoot") then { [[player]] [[kbRemoveTopic]] "dontShoot"; };</code> |EXAMPLE2=
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[Conversations]], [[kbAddTopic]], [[kbTell]], [[kbReact]], [[kbRemoveTopic]], [[kbAddDatabase]], [[kbAddDatabaseTargets]], [[FSM]], [[FSM Editor]] |= See also
| [[Conversations]], [[kbAddTopic]], [[kbTell]], [[kbReact]], [[kbRemoveTopic]], [[kbAddDatabase]], [[kbAddDatabaseTargets]], [[FSM]], [[FSM Editor]] |SEEALSO=


}}
}}

Revision as of 14:42, 7 April 2019

Hover & click on the images for description

Description

Description:
Check if conversation topic was registered to given person. See Conversations for more details.
Groups:
Uncategorised

Syntax

Syntax:
person 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:
ConversationskbAddTopickbTellkbReactkbRemoveTopickbAddDatabasekbAddDatabaseTargetsFSMFSM 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

Notes

Bottom Section