Announcement

Collapse
No announcement yet.

Blueprint Dialogue System

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Originally posted by crossmr View Post
    is there any way to return the current branch? Also is there a way to disable, but not hide a branch in a hub? ...
    Then on condition show either the first or second branch, but if the second branch is chosen, either click on it would do nothing, or the button would be disabled.
    The current branch is stored on the BPC_Dialogue in a variable called "CurrentState". If you need to access it from the dialogue table, you can create a custom function to return it (I don't believe there's a built in one for that).

    As for disabling but still showing, this isn't a currently supported feature (I'm surprised I haven't come across a need for that in my games tbh).
    If you'd like to add it, I would suggest taking a look at UI_Dialogue::AddResponseItem() (there are two of them, an event and a function - both might be useful).
    You might be able to add additional custom traits in order to do this.

    Originally posted by crossmr View Post
    Additional issue, I keep getting this error in 4.23. I have opened the blueprint "verified and saved" but it keeps popping back up. How can it be fixed?
    ...
    I don't seem to have this issue, though I may have fixed it at some point on my end. You might be able to change the default values to something else, then back, and then save to get rid of it?

    Comment


      Originally posted by Grogger View Post

      The current branch is stored on the BPC_Dialogue in a variable called "CurrentState". If you need to access it from the dialogue table, you can create a custom function to return it (I don't believe there's a built in one for that).

      As for disabling but still showing, this isn't a currently supported feature (I'm surprised I haven't come across a need for that in my games tbh).
      If you'd like to add it, I would suggest taking a look at UI_Dialogue::AddResponseItem() (there are two of them, an event and a function - both might be useful).
      You might be able to add additional custom traits in order to do this.



      I don't seem to have this issue, though I may have fixed it at some point on my end. You might be able to change the default values to something else, then back, and then save to get rid of it?

      Unfortunately one of them is in something I can't edit.
      ‚Äč

      Comment


        For some reason my previous image didn't attach.. today I went to start my project and it told me that math expression had an error. I was unable to edit anything because it's "read only", but when I clicked on it to open it, suddenly everything was unhooked in the math expression.

        Click image for larger version

Name:	dialogtextitem.png
Views:	111
Size:	93.6 KB
ID:	1715440Click image for larger version

Name:	mathexpression.png
Views:	98
Size:	99.2 KB
ID:	1715441

        Comment


          Originally posted by crossmr View Post
          For some reason my previous image didn't attach.. today I went to start my project and it told me that math expression had an error. I was unable to edit anything because it's "read only", but when I clicked on it to open it, suddenly everything was unhooked in the math expression.

          Click image for larger version

Name:	dialogtextitem.png
Views:	111
Size:	93.6 KB
ID:	1715440Click image for larger version

Name:	mathexpression.png
Views:	98
Size:	99.2 KB
ID:	1715441
          Looks to be an Blueprint issue. I imagine re-creating the math expression node should do the trick.

          Comment


            Yes, I'd never worked with math expressions before. It turned out to be a simple matter of pressing F2 to rename it and immediately pressing enter, then it was fine. I think I've cleared up all outstanding warnings and errors, but I'll double check it.

            Comment


              Hi Grogger

              Is there a way to shuffle the branches in a hub so I could change the order of the option is chosen for a quiz?

              Comment


                Originally posted by haolil View Post
                Hi Grogger

                Is there a way to shuffle the branches in a hub so I could change the order of the option is chosen for a quiz?
                The "RandBranch" trait should do what you're looking for, I think.

                Comment


                  Originally posted by Grogger View Post

                  The "RandBranch" trait should do what you're looking for, I think.
                  I tried that before, the RandBrach would only randomize the branch but won't show in the hub as shuffle choices. Is it possible to do two traits? I was unable to have two traits set up.

                  Comment


                    Originally posted by haolil View Post

                    I tried that before, the RandBrach would only randomize the branch but won't show in the hub as shuffle choices. Is it possible to do two traits? I was unable to have two traits set up.
                    Oh I see, I misunderstood. No the system can't do that yet. You should be able to add that behavior though in UI_Dialogue::SetDialogueTableItem::AddResponseItems

                    Comment


                      Hey Grogger great work on this! Before I buy it I just had a couple questions..

                      Can I trigger the dialogue through Sequencer events and/or have the dialogue trigger Sequences? For instance, when I walk up to a character and interact with them I want to be able to trigger a Sequence (so I have full control over the camera and animations and all that stuff), while still having the dialogue play out during it and still be interactable.

                      And second, is there an option to attach sound to the typewriter effect? So as the letters type out they make little click noises or whatever. I could probably just attach a sound file to each dialogue entry, but it wouldn't be dynamic and follow the speed and end points of the dialogue lines properly.

                      Thanks!

                      Comment


                        Originally posted by Shakunga View Post
                        Hey Grogger great work on this! Before I buy it I just had a couple questions..

                        Can I trigger the dialogue through Sequencer events and/or have the dialogue trigger Sequences? For instance, when I walk up to a character and interact with them I want to be able to trigger a Sequence (so I have full control over the camera and animations and all that stuff), while still having the dialogue play out during it and still be interactable.

                        And second, is there an option to attach sound to the typewriter effect? So as the letters type out they make little click noises or whatever. I could probably just attach a sound file to each dialogue entry, but it wouldn't be dynamic and follow the speed and end points of the dialogue lines properly.

                        Thanks!
                        Howdy, and thank you for the kind words

                        The dialogue can be controlled through Sequencer events, so long as you can find the actor and component that will be hosting the conversation. There is a function called SetState which can skip to the dialogue branch you'd want to playback, so you can call this from your Sequencer event handler.

                        For the sound, I didn't build that in but in my games I usually put it in the UI_DialogueTextItem initialization (this happens for each text character as it appears on the screen) or OnCharactersDisplayedChanging in UI_Dialogue.

                        Comment


                          Hey again! Thanks for the tips! Everything's going really well so far but I'm having a bit of trouble getting the dialogue SetState function to execute off a custom event from my Sequence through a BP Interface. The Sequence Event is set up properly and works in other contexts, but when I try and put it in a child of BPC_Dialogue it doesn't fire at all.. I'm assuming this is because I'm not referencing the Actor that's hosting the dialogue, so I followed your video tutorial where you set up the BPC_UseScanner in the Character Blueprint, but putting my Event in there doesn't seem to work either.. Any help is super appreciated. Thanks!

                          Click image for larger version

Name:	dialogueQ_02.jpg
Views:	63
Size:	344.3 KB
ID:	1726000

                          Comment


                            Woo well I figured it out! If anyone is curious, here's how to do it in 4.24:

                            Add the actor that has your BPC_Dialogue component attached to it to a new track in your sequence > add an event track for that actor > add an event keyframe and then right click on the keyframe and go up to Properties > Event > Quick Bind > then search for your SetState function from the BPC_Dialogue component and select it. It will automatically add an event to the sequence's Event Graph and make all the necessary connections. The dialogue will now activate wherever you set your event keyframe in the sequence.

                            Click image for larger version

Name:	dialogueQ_03.jpg
Views:	58
Size:	326.1 KB
ID:	1727483

                            Comment


                              Originally posted by Shakunga View Post
                              Woo well I figured it out! ...
                              I'm glad you've figured it out!
                              Sorry for the delay in responding, we've just launched our game so I've been buried with things to do all of the sudden.

                              Comment


                                No worries! Congrats on your game! Sorry to keep bothering you but I think I've run into a bug? Or perhaps I'm just doing it wrong. I can't get setPassiveDialogue to work properly. It will indeed switch to a passive flow when used as a PreAction, but it doesn't enable the player to walk around during it. And vice versa, if I use the Passive checkbox on the component, it will flow properly and correctly enable player movement, but then when I switch it mid-dialogue as a PreAction, it will switch the player movement off but the player won't be able to interact with the dialogue menu, leaving it in a bugged state.

                                I've repro'd this on a clean install of your demo map as well. Any ideas?

                                Click image for larger version

Name:	passiveMode.png
Views:	70
Size:	90.1 KB
ID:	1729149

                                Comment

                                Working...
                                X