Download the following project and relative files, paste the files into the project content folder
Open the project, then open and close each added files (to activate them by UE)
3 nodes BP are provided by the tutorials (3rd person, NPC, and dialogue)
Set 3rd person character:
Open 3rd person BP, event graph, copy and paste following 3 BP:
Nodes 1 - ThirdPersonCharacter:
For Node 1:
R click on those error nodes, Create variables
Change Quest Complete and Remove Quest nodes Input as Active Quest
Go to Dialogue folder → NPC Interact BP interface
Add Activate Dialogue Input :
Back to 3rd person BP, add Active Quests to Quest LogInfo (also command the graph as Interact)
Set NPC:
Open NPC Dialogue widget , graph
add variable boolean, QuestFinsihed
Open NPC BP, viewport
Add static mesh component, called Questionmark
Choose following mesh and Mtl
Collision preset: No Collision
Tick Hidden in Game
move the mesh above character, scale down
Duplicate the question mark component, rename as Exclamation mark
Replace the mesh and Mtl
Go to Event graph
Copy and paste Node 2 in it
Replace the questionmark and !Mark nodes by what just created in viewport
Replace NPC chat node in Quest complete, and SET Quest Finished too
Tick Quest Finished in SET
R click and Create variables for these too:
P.S If using different character from 3rd person, just cast that character here and recall the accept quest event
Tick Instance editable in Quest Ref node
Select NPC character in the scene, in Details, input the message in: Default → Conversation Info:
Set the Quest:
Scroll down the Details column, quest Ref, fill in Quest name and description:
Example of Actor Reference:
Location quest: Select the location BP (template included
Killing quest: Choose the target object to kill
Pick up quest: Choose the item to pick up
etc
Drag the location BP in scene
Back to NPC Quest Ref, use eyedropper to select the location BP in scene
Back to NPC BP graph, in event begin play nodes, add follow:
In Interact command nodes, change the reroute node to remove quest node as follow:
Move the original Interact command to the new downloaded Interact and connect as below:
Combine 2 interact commands into 1
At the end of Interact command, replace Questionmark node to set hidden in game node
Set Dialogue to accept the Quest:
Open NPC Chat strcuture
Add 3 text variables:
Go to NPC dialogue widget, event graph
In Quest command, add follow nodes:
Copy and paste the following nodes BP in the graph
In Quest Accepted Message command, change the in text input in SetText node to Quest Accepted message output:
In Quest Hand in Message command, repeat the same but this time connect to Quset hand in message
Create variable on Quest completed Set node at the end
Repeat the same on Quest Completed Message command
create variable boolean called QuestAccepted
Put in Quest command
In Go to Message 1 command, add the following in beginning
Go to On Mouse button Down funciton
duplicate the nodes at the bottom below and connect to a new branch as follow:
Test the quest:
Go to scene, select the NPC and input responses (in quest accepted message):
Test in play mode
Set Quest objective:
Go to Location BP, revise the highlight nodes in event graph:
For killing or pickup quest, call the highlight nodes (i.e all nodes after 1st node) below after enemy dies/item be picked up
Set Quest Reward (Optional):
Make the below self custom events in NPC graph