kbAddTopic: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (seeAlso edited) |
m (template:command argument fix) |
||
Line 7: | Line 7: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| Register conversation topic to given person. See [[Conversations]] for more details. |= | | Register conversation topic to given person. See [[Conversations]] for more details. |DESCRIPTION= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| person [[kbAddTopic]] [topicName, conversationFile, fsmFile, eventHandler] |= | | person [[kbAddTopic]] [topicName, conversationFile, fsmFile, eventHandler] |SYNTAX= | ||
|p1= person: [[Object]] |= | |p1= person: [[Object]] |PARAMETER1= | ||
|p2= topicName: [[String]] - the topic id for further reference |= | |p2= topicName: [[String]] - the topic id for further reference |PARAMETER2= | ||
|p3= conversationFile: [[String]] - .bikb file path |= | |p3= conversationFile: [[String]] - .bikb file path |PARAMETER3= | ||
|p4= fsmFile: [[String]] - (Optional) .fsm file path. Receives the following parameters: | |p4= fsmFile: [[String]] - (Optional) .fsm file path. Receives the following parameters: | ||
Line 23: | Line 23: | ||
* '''_this:''' the person that was talked to (receiver) | * '''_this:''' the person that was talked to (receiver) | ||
* '''_from:''' the person that talked to the receiver and triggered the script | * '''_from:''' the person that talked to the receiver and triggered the script | ||
|= | |PARAMETER4= | ||
|p5= eventHandler: [[Code]] or [[String]] - (Optional) '''The event handler receives the same parameters as the fsm''' |= | |p5= eventHandler: [[Code]] or [[String]] - (Optional) '''The event handler receives the same parameters as the fsm''' |PARAMETER6= | ||
| [[Nothing]] |= | | [[Nothing]] |RETURNVALUE= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1= <code>[[player]] [[kbAddTopic]] ["myTest", "myTest.bikb", "myTest.fsm", [[compile]] [[preprocessFileLineNumbers]] "myTest.sqf"];</code> |= | |x1= <code>[[player]] [[kbAddTopic]] ["myTest", "myTest.bikb", "myTest.fsm", [[compile]] [[preprocessFileLineNumbers]] "myTest.sqf"];</code> |EXAMPLE1= | ||
|x2= <code>[[player]] [[kbAddTopic]] ["itsGettingWarm", "weatherTalk.bikb"];</code> |= | |x2= <code>[[player]] [[kbAddTopic]] ["itsGettingWarm", "weatherTalk.bikb"];</code> |EXAMPLE2= | ||
| [[Conversations]], [[kbHasTopic]], [[kbTell]], [[kbWasSaid]], [[kbReact]], [[kbRemoveTopic]], [[kbAddDatabase]], [[kbAddDatabaseTargets]], [[FSM]], [[FSM Editor]] |= | | [[Conversations]], [[kbHasTopic]], [[kbTell]], [[kbWasSaid]], [[kbReact]], [[kbRemoveTopic]], [[kbAddDatabase]], [[kbAddDatabaseTargets]], [[FSM]], [[FSM Editor]] |SEEALSO= | ||
}} | }} |
Revision as of 14:42, 7 April 2019
Description
- Description:
- Register conversation topic to given person. See Conversations for more details.
- Groups:
- Uncategorised
Syntax
- Syntax:
- person kbAddTopic [topicName, conversationFile, fsmFile, eventHandler]
- Parameters:
- person: Object
- topicName: String - the topic id for further reference
- conversationFile: String - .bikb file path
- fsmFile: String - (Optional) .fsm file path. Receives the following parameters:
- _sentenceId: the sentence as defined in the .bikb file
- _topic: TopicName registered via kbAddTopic
- _this: the person that was talked to (receiver)
- _from: the person that talked to the receiver and triggered the script
- eventHandler: Code or String - (Optional) The event handler receives the same parameters as the fsm
- Return Value:
- Nothing
Examples
- Example 1:
player kbAddTopic ["myTest", "myTest.bikb", "myTest.fsm", compile preprocessFileLineNumbers "myTest.sqf"];
- Example 2:
player kbAddTopic ["itsGettingWarm", "weatherTalk.bikb"];
Additional Information
- See also:
- ConversationskbHasTopickbTellkbWasSaidkbReactkbRemoveTopickbAddDatabasekbAddDatabaseTargetsFSMFSM 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