Dialogue with UE

Install Dialogue Tree from UE Marketplace

Open up the third person template

Go to plugins

Activate DialogueTree

Restart Editor

In the third person template

I added a new folder in the content drawer and named it dialogue

Inside the Dialogue Folder

Add a new character blueprint

Name it BP_NPC

Open the Blueprint

Add the Skeletal mesh

Add the animation class

Rotate toward the arrow

Add the NPC to your game

In your dialogue folder

right click

hover over Blueprint

Select Blueprint interface

In your Dialogue Folder

Right Click 

Select Dialogue Tree

name it DLG_Talk

Open up the new Dialogue tree

Right Click on the node

Select NPC InputTransition

With the NPC Speech Selected

In your info panel, give the Speech a name and add some text

Connect the nodes

Right click in the graph and add two Player Auto Transitions

Give the two Auto Transitions different titles like A and B and different Speech Text

Connect the nodes

Open up your BP_ThirdPersonCharacter

In Components Add BPC_Speaker Component

With the SpeakerComponent Selected

In the details panel under dialogue

Change Display Name to You

Dialogue name to Player (to match the DLG_Talk)

Compile Save

Open up your BP_NPC (full editor)

Add BPC Speaker Component

In the details panel, find dialogue

Give it a display name

Name Dialogue Name NPC

Click the dropdown in the Owned Dialogue

Select the DLG_Talk that you created

Add a sphere collision from the components

Make the radius large

With the Collision sphere selected

In the details panel, add an On Component Begin Overlap Event

From Other actor, pull out Get Component by Class

From the component class drop down, select BPC_SpeakerComponent

From return value

Pull out ? Is Valid

Connect the Begin Overlap to Is Valid

Pull Out BPC Speaker Component

From BPC Speaker Component

Pull Out Start Owned Dialogue

Connect Is Valid to Start Owned Dialogue

Connect BPC Speaker Component to In Speakers (Start Owned Dialogue)

This will create an array node

Click Add Pin

Connect the Return Value from Get Component By Class to the (1) pin in your array

Compile, Save and test