... | @@ -172,9 +172,9 @@ This will increase the `ColorChangeRequestCount` variable each time the dialogue |
... | @@ -172,9 +172,9 @@ This will increase the `ColorChangeRequestCount` variable each time the dialogue |
|
|
|
|
|

|
|

|
|
|
|
|
|
# 4. Setting up the Player and Starting the Dialogue
|
|
# 4. Setting up the Player
|
|
|
|
|
|
## a. Implement the `DlgDialogueParticipant` Interface on the Player **Blueprint**
|
|
## a. Implement the `DlgDialogueParticipant` Interface
|
|
|
|
|
|
- Open the Player **Blueprint** (for example `BP_ThirdPersonCharacter`)
|
|
- Open the Player **Blueprint** (for example `BP_ThirdPersonCharacter`)
|
|
- Go the the `Class Settings` to add the `DlgDialogueParticipant` interface to the implemented interfaces list.
|
|
- Go the the `Class Settings` to add the `DlgDialogueParticipant` interface to the implemented interfaces list.
|
... | @@ -184,7 +184,7 @@ This will increase the `ColorChangeRequestCount` variable each time the dialogue |
... | @@ -184,7 +184,7 @@ This will increase the `ColorChangeRequestCount` variable each time the dialogue |
|
|
|
|
|

|
|

|
|
|
|
|
|
## b. Create the `StartDialogueWithNPC` Custom Event on the Player **Blueprint**
|
|
## b. Create the `StartDialogueWithNPC` Custom Event
|
|
|
|
|
|
- Open the `EventGraph` of your Player **Blueprint**
|
|
- Open the `EventGraph` of your Player **Blueprint**
|
|
- Add a `Custom Event` with the Name `StartDialogueWithNPC`
|
|
- Add a `Custom Event` with the Name `StartDialogueWithNPC`
|
... | @@ -192,21 +192,22 @@ This will increase the `ColorChangeRequestCount` variable each time the dialogue |
... | @@ -192,21 +192,22 @@ This will increase the `ColorChangeRequestCount` variable each time the dialogue |
|
- `Dialogue` of type `DlgDialogue`
|
|
- `Dialogue` of type `DlgDialogue`
|
|
- `NPC` of type `Object`
|
|
- `NPC` of type `Object`
|
|
- Start the Dialogue by calling `StartDialogue`
|
|
- Start the Dialogue by calling `StartDialogue`
|
|
- Set the `DialogueContext` Variable of the **Blueprint** from the return of the `StartDialogue`
|
|
- Use the return value of the `StartDialogue` to set the `DialogueContext` Variable of the **Blueprint**
|
|
|
|
|
|

|
|

|
|
|
|
|
|

|
|

|
|
|
|
|
|
|
|
|
|
1. Open the `TopDownController` Blueprint and add a `DlgContext` variable. Make it public.
|
|
## c. Create the `SelectDialogueOption` Custom Event
|
|

|
|
|
|
|
|
|
|
2. Add the `StartDialogue` function. Input parameters are a `Dialogue` and an `Object`. Use the return value to set the ActiveContext variable.
|
|
- Open the `EventGraph` of your Player **Blueprint**
|
|

|
|
- Add a `Custom Event` with the Name `SelectDialogueOption`
|
|
|
|
- Set the following inputs
|
|
|
|
- `OptionIndex` of type `Integer`
|
|
|
|
- Call `ChooseOption` (NOTE: we will handle the return value later when we have the UI setup)
|
|
|
|
|
|
3. Add the `SelectDialogueOption`function.
|
|

|
|

|
|
|
|
|
|
|
|
|
|
|
|
# 5. Starting the dialogue
|
|
# 5. Starting the dialogue
|
... | | ... | |