UE4 Dialogue Implementation
Static and NPC Text Dialogue
Test map to get multiple NPCs to have multiple different lines output to text. Also static object text output. Details of work flow and blueprints below.Â
Created in Unreal Engine 4.
Actor Setup
The static actors and NPC characters were set up to have collision boxes for the player to only interact when close to the actor.
Dialogue Structure Creation
Dialogue structure is created with set fields that can be assigned in Blueprints.
Dialogue Import
Dialogue is imported to a data table from a .csv file
Dialogue Widget
Widget created to create a text box for the text to print out to
Interaction Blueprint
Blueprint to enable the player to interact with the static meshes and NPCs
Signpost Interact Blueprint
Blueprint created to display text on screen when the Sign post is interacted with. Signpost text is assigned to the individual sign post asset.
NPC Get Line Function
Function created to get the desired line from the data table containing all lines.Â
Each NPC has a set number and lines which can be played on the specific NPC
NPC Dialogue Create Function
Function created to post the desired line to the Dialogue Widget and be displayed on screen