Has anybody already played with the conversation system (eg. kbAddTopic script commands) or is there already any documentation, which I've missed?
Has anybody already played with the conversation system (eg. kbAddTopic script commands) or is there already any documentation, which I've missed?
You might want to check the comref.
The summary is:
kbAddTopic adds a topic (duh!) to a person with the .bikb (list of sentences), .fsm (conversation flow script for the AI) and/or .sqf (conversation flow script for a player) files as its parameters
kbTell makes the person actually say a specific sentence (defined in the .bikb file)
Conversation flow scripts are executed every time a sentence was said to the person with passed parameters being:
_sentenceId: the sentence as defined in the .bikb file
_topic: topic name registered via kbAddTopic
_this: the person that was talked to (receiver)
_from: the person that talked to the receiver and triggered the script
The game, Mrs. Hudson, is ON!
Thanks Jezuro, I had a look at the wiki/comref but without examples it's a little tough to understand it.
Will try it out.
Just unpack the campaign in yourarmafolder\Addons\missions
There are a lot of "examples". Sure you have to figure out how they work together but thats easy![]()
works well for NPC conversations, but what do I have to do if I wanna add a topic for the player?
Example:
My thought was that I (as the player) could use the sentence(s) somehow to communicate to NPCs (similar to the standard 'Greetings' conversation'), now.Code:c1 kbAddtopic["myTest", "myTest.bikb", "", "myTest.sqf"]; // works sleep 2; c1 kbTell [m1, "myTest", "myTest_A_0"]; // works fine player kbAddtopic["myTest", "myTest.bikb", "", "myTest.sqf"]; // and now??
What's the flow here? Thx
For the player you need to use call for the script.
Code:player kbAddtopic["myTest", "myTest.bikb", "", {call compile preprocessFileLineNumbers "myTest.sqf"}];
@Jezuro
I need your help again:
I did some further tests, here the code:
init.sqf
event handler mytest.sqf:Code:hint "KbTopic"; c1 kbAddtopic["myTest", "myTest.bikb", "", {call compile preprocessFileLineNumbers "myTest.sqf"}]; player kbAddtopic["myTest", "myTest.bikb", "", {call compile preprocessFileLineNumbers "myTest.sqf"}]; c1 doMove (position receiver); sleep 10; c1 lookAt receiver; sleep 3; c1 kbTell [receiver, "myTest", "myTest_A_0"];
When I run the testmission I get immediately the 'kbTell' event handled if I -as the player- approach any unit (_sentenceid is initial).Code:hint format ["From:%1, Topic:%2, Sentence:%3", _from, _topic, _sentenceId];
And I do not see my Topic in any menu...do I have to add it manually somehow?
And what is also strange is that the event handler for
<<<c1 kbTell [m1, "myTest", "myTest_A_0"]; >>>
is not triggered although c1 speaks to receiver
Probably I missed sth completely here![]()
any update on this issue? thx.
Nevermind I think I found my solution, which when finished I will post for others.![]()
Last edited by Rommel; Jul 6 2009 at 06:48.
in Ofpec found this topic that might be of use http://www.ofpec.com/forum/index.php?topic=29905.0