Page 1 of 3 123 LastLast
Results 1 to 10 of 27

  Click here to go to the first Developer post in this thread.  

Thread: Conversation System

  1. #1

    Conversation System

    Has anybody already played with the conversation system (eg. kbAddTopic script commands) or is there already any documentation, which I've missed?

  2.   Click here to go to the next Developer post in this thread.   #2
    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!

  3. #3
    Lance Corporal
    Join Date
    Apr 12 2009
    Location
    Germany
    Posts
    48
    Author of the Thread
    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.

  4. #4
    Master Sergeant Serclaes's Avatar
    Join Date
    Nov 27 2005
    Location
    this town right here
    Posts
    775
    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

  5. #5
    Lance Corporal
    Join Date
    Apr 12 2009
    Location
    Germany
    Posts
    48
    Author of the Thread
    works well for NPC conversations, but what do I have to do if I wanna add a topic for the player?

    Example:
    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??
    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.

    What's the flow here? Thx

  6.   This is the last Developer post in this thread.   #6
    For the player you need to use call for the script.

    Code:
    player kbAddtopic["myTest", "myTest.bikb", "", {call compile preprocessFileLineNumbers "myTest.sqf"}];

  7. #7
    Lance Corporal
    Join Date
    Apr 12 2009
    Location
    Germany
    Posts
    48
    Author of the Thread
    @Jezuro

    I need your help again:

    I did some further tests, here the code:

    init.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"];
    event handler mytest.sqf:

    Code:
    hint format ["From:%1, Topic:%2, Sentence:%3", _from, _topic, _sentenceId];
    When I run the testmission I get immediately the 'kbTell' event handled if I -as the player- approach any unit (_sentenceid is initial).
    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

  8. #8
    Lance Corporal
    Join Date
    Apr 12 2009
    Location
    Germany
    Posts
    48
    Author of the Thread
    any update on this issue? thx.

  9. #9
    Master Gunnery Sergeant
    Join Date
    Dec 13 2003
    Location
    Melbourne, Australia
    Posts
    1,362
    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.

    Australian Armed Forces - Dedicated Tactical Coop Squad for ArmA2

  10. #10

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •