Forum rules - please read before posting.

A dialogue system that simulates thoughts

edited September 2015 in Technical Q&A
Hi,

We want to create a dialogue system that simulates thoughts that occur in the player while NPCs are talking.

Something like this - While a NPC talks, thought bubbles appear around the Player’s head.

Clicking on one of these thoughts causes the Player to talk and the NPC to react.

As the NPC talks, new, related, thought bubbles appear above the player’s head. Irrelevant thoughts vanish.

Any tips?

I assume we’ll have to build a custom thought bubble framework. So can someone suggest what exposed AC API calls and features I should look at?

I’ll need to be able to trigger the player’s speech when a thought bubble is selected.

The thought bubbles will need to display while the NPC is talking.

Selecting the thought bubble will need to interrupt the NPC.

Are there events/call backs when a NPC finishes a Dialogue? I assume there are, this will help us to trigger a thought bubble.

any help is appreciated.

Cheers.

Comments

  • You should be able to do this with the regular Conversation system - a Conversation, on a technical level, just provides buttons on the screen that run different Actions when clicked on.  You could create a Conversation whenever you want the player to "think" in this way.

    As for displaying a speech bubble, you can use a custom Menu for that (either a regular AC one, or one made with Unity UI).  Unity UI menus have the advantage of being able to be positioned in 3D space, and you can use the Menu Manager to position any Menu to appear above the player.

    If you already have Conversations in your game (with their own, separate Menu), you can disable this one, and enable the "thought bubble" one, by using the Menu: Change state Action to lock one and unlock the other.

    AC's Dialogue: Play speech Action has a Play in background? option on it, which will mean the next Action that follows to run without waiting for the NPC to finish.  If your subtitle text scrolls, and you want the ActionList to continue mid-line, you can insert the [continue] token within the speech text to tell the ActionList to "move on" when the NPC reaches that point.

    If you wanted to go down a more custom scripted route, start by looking into the Dialog script, which includes a function to check if a given character is speaking.
  • Thank you so much! I am really impressed with the AC game tool kit.

    I'll report back after I try some approaches.


  • edited September 2015




    Hi,

    I have several NPCes carrying on a conversation between themselves, in the Interaction component I have the 0 Dialogue node set to "Action type: Dialogue Play Speech", this starts the conversation between the NPCes without the need for the player to initiate the Dialogue/Interaction. 

    As I shared before, we want to have Player thought bubbles come and go as the NPCes are having their conversation. Multiple thought bubbles will be displayed at once, irreverent ones (conversation topic has moved on) will vanish. 

    In our Interaction ActionList Editor branch for the NPC conversation (that I mentioned above in this comment), I see that I can add a node with “Action type:” set to “Menu - Change state”. It appears that with this Action type I can enable and disable our “thought bubbles”. This is what you suggested, correct?

    How would I “force” the thought bubbles to display even when the NPCes are talking? Will clicking a thought bubble stop the current branch in the ActionList and start the branch attached to the Thought bubble (Dialogue option)? Perhaps you addressed this in your answer, if so, sorry if I’m not getting it.

    Thanks!

    *sorry, don't know why there's so much space at the top of this post

  • How do I force the Player's Dialogue Options Menu open while the NPC's are talking?
  • edited September 2015
    In the AC Game Editor -> Menu -> Conversation, I'm selecting 'Appear type: Manual'. And then in my Interaction the first node is 'Menu: Change State' and 'Change type: Turn On Menu'. This does not turn on the Conversation Options Menu, should it? What do I enter in 'Menu to turn on:' ? I tried "Conversation", this is the string in the 'Menu name' field in AC Game Editor -> Menu -> Conversation.

    But the conversation options menu is not displaying.

    Andy tips on how to keep the conversation options menu open even while a NPC is speaking and displaying Subtitles?

    Thanks
  • The Conversation's Appear type should be left as During Conversation - it won't work otherwise.

    A gameplay-blocking ActionList (all are, by default) will stop running once you use the Dialogue: Start conversation Action, as it's then assumed that the Player takes control.  However, ActionLists set to Run In Background (at the top of their Inspectors) should continue to run.

    I would advise having the NPCs speak to themselves in their own ActionList that runs in the background, and call a separate, gameplay-blocking, Cutscene whenever a Converastion should appear.  The ActionList: Run Action can be used to run another Cutscene in parallel to the one that's already running.
  • Thank you for your reply.

    In the Interaction Prefab that AC Game Editor placed in the Empty GameObject called '_Interactions', and under its Interaction Component I set 'When running:' to 'Run in background'. 

    When I'm presented with the Conversation Options Menu, I click it, the conversation continues but the Menu disappears.

    Perhaps I misunderstood your suggestion but shouldn't the Menu stay open?
  • Ah I see now, never mind. The ActionList continues without "pausing" the game, so the player can still interact with the world. 

    Thank you, but that's not what we need. We just need a Dialogue Option List Menu that stays open so the player can interrupt the conversation (action list) at any point, and not wait for 'Dialogue: Start conversation" action.

    When I have some time, I'll try you suggestion concerning creating two ActionList that run simultaneously. 

    Do you think this suggestion/option will create a Menu that Updates? The conversation (ActionList) between the two NPCes will be toggling Dialogue Options on and off. So the Dialogue Option Menu that stays open will have to update.

    Thanks again!
  • I believe that's what I was suggesting.  The other ActionList (with your NPCs talking) will continue to run while the player is presented with the options.  The Conversation should be displayed at this time - it's not clear if you've gotten this far or not.

    The Conversation menu itself will not currently update with the changing options, but I will see if this can be amended in the next update.  However, you will be able to enforce an update by using two successive "Menu: Change state" Actions to lock and unlock the Conversation Menu after changing an option.
  • Regarding the updating Conversation menu, this has been taken care of and is included in the v1.48 update.
  • Thanks for adding that. I'm not sure when I'll get a chance to try it out. But when I do, I'll report back.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.