Announcement

Collapse
No announcement yet.

Blueprint Dialogue System

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

    Hey Grogger I'm in love with the custom script functions and am finding them to be super useful in contexts other than just when dialogue is playing. Like doing camera moves/animations/sounds etc. when I activate a simple button through the Usable system. But I'm having a hard time figuring out how exactly to get the HandleScriptFunction to execute in just a normal child blueprint of BPC_UseActionHandler. I'm assuming it's pretty simple, right? I just don't know which function to call and how to hook it up properly. Is it one of these two?

    Attached Files

    Comment


      Originally posted by Shakunga View Post
      Hey Grogger I'm in love with the custom script functions and am finding them to be super useful in contexts other than just when dialogue is playing. Like doing camera moves/animations/sounds etc. when I activate a simple button through the Usable system. But I'm having a hard time figuring out how exactly to get the HandleScriptFunction to execute in just a normal child blueprint of BPC_UseActionHandler. I'm assuming it's pretty simple, right? I just don't know which function to call and how to hook it up properly. Is it one of these two?
      Glad to hear it!

      Aye the ExecuteScript node is what is used internally to run commands in the dialogue. This should find its way to the HandleScriptFunction if there is valid function syntax found in the ScriptString. The custom handler is going to be your BPC_Dialogue that implements the HandleScriptFunction.

      Comment


        Ah so i did actually have this set up correctly! I think it wasn't working cause my GetScriptInterpreter's target was getting set to BPIDialogueDatatableHost instead of my BPC_Dialogue component, so i just manually hooked that up to target and it started working. Thanks!

        Comment


          Hello Grogger the Dialogue System is amazing thank you! Just wanted to ask though which blueprints in the system should I look at if say I wanted to change how the dialogue triggers for example if I wanted it to trigger when the level starts or when player walks to a certain point?

          Thank you so much

          *EDIT* Okay got it all working for just stepping onto a trigger so just what about with a level start?
          Last edited by Trauts123; 10-12-2020, 03:15 AM.

          Comment


            Originally posted by Trauts123 View Post
            Hello Grogger the Dialogue System is amazing thank you! Just wanted to ask though which blueprints in the system should I look at if say I wanted to change how the dialogue triggers for example if I wanted it to trigger when the level starts or when player walks to a certain point?

            Thank you so much

            *EDIT* Okay got it all working for just stepping onto a trigger so just what about with a level start?
            Hey there, glad you're enjoying it

            To trigger manually, you can either call the "Use" or the "SetState" function on the BPC_DialogueComponent. So on Level start (maybe BeginPlay in your level blueprint), you can use the reference of the actor hosting the dialogue component in your project, and get the component to call one of those functions.

            Comment


              Originally posted by Grogger View Post

              Hey there, glad you're enjoying it

              To trigger manually, you can either call the "Use" or the "SetState" function on the BPC_DialogueComponent. So on Level start (maybe BeginPlay in your level blueprint), you can use the reference of the actor hosting the dialogue component in your project, and get the component to call one of those functions.
              Thanks for the reply! I don't think I am setting it up right for the on BeginPlay? Can you tell what I am doing wrong sorry? (The BPC Dialogue is just placed on a random cylinder and it does work if I manually activate it with the character) Thank you! Click image for larger version

Name:	BeginPlay.png
Views:	16
Size:	75.9 KB
ID:	1822061

              Comment


                Originally posted by Trauts123 View Post

                Thanks for the reply! I don't think I am setting it up right for the on BeginPlay? Can you tell what I am doing wrong sorry? (The BPC Dialogue is just placed on a random cylinder and it does work if I manually activate it with the character) Thank you! Click image for larger version

Name:	BeginPlay.png
Views:	16
Size:	75.9 KB
ID:	1822061
                If your cylinder has a BPC_Dialogue component, you should be get the component from the actor and call it's use function directly.

                Comment


                  Originally posted by Grogger View Post

                  If your cylinder has a BPC_Dialogue component, you should be get the component from the actor and call it's use function directly.
                  Ah thank you so much

                  Comment

                  Working...
                  X