Skip to content

Example Blueprint Using Dialogue Values

Daniel Butum edited this page Oct 22, 2020 · 10 revisions

[[TOC]]

ℹ️ NOTE: An example like here is implemented in the Example Project

1. Ensure your Character implements the DlgDialogueParticipant interface

implement_interface_with_annotations

implement_interface_expanded_with_annotations

2. Create a Blueprint Struct

ℹ️ An example struct Dlg_Data_Struct you can copy is also in the Example Project

Copy the Struct from the Plugin Content

  • In the content Browser Press View Options -> Show Plugin Content
  • Navigate to the DlgSystem Content
  • Copy the Example_Struct_DialogueData to your Project Content Folder

Export_ExampleBlueprintStruct

Create New Struct

  • Create new asset from the content browser -> Blueprints -> Structure
  • Add 4 new variables, make Save Game to be checked for all of them.
    • Integers - Map (Dictionary) from Name to Integer
    • Floats - Map (Dictionary) from Name to Float
    • Names - Map (Dictionary) from Name to Name
    • TrueBools - Set of Name

Export_NewBlueprintStruct

3. Implement Participant Interface Functions

  1. Go back to the character blueprint. Add a new variable with the name DlgData, set the type to DlgData.

  2. Implement the Modify... and Get... interface functions: function_ModifyNameValue function_ModifyIntValue function_ModifyFloatValue function_ModifyBoolValue

function_GetNameValue function_GetIntValue function_GetFloatValue function_GetBoolValue

Clone this wiki locally