Skip to content

Participants

Participants are game objects which have a close association with a runtime dialogue; most likely objects like your player character, and the characters they're talking to.

Participants are likely to:

  • Own the dialogue instance (one of them, probably the NPC)
  • Provide and retrieve variables from the dialogue
  • Receive events from the dialogue

In order to do this, participant objects need to implement the ISUDSParticipant interface, and override whichever methods they need to from that interface:

Participant Interface

While it's possible for any other object to do all of the things above as well, in the case of events there are matching delegates for everything in ISUDSParticipant, it's better to make a Participant in these cases, because you have more control over the order of invocation.

Participants are guaranteed to be called in a known order based on their return value from GetDialogueParticipantPriority. Also it's generally neater not to have to bind to all the separate delegates to access the hooks shown above.

Adding Participants To A Dialogue

Using BP_SudsProDialogueRunner

When running dialogue using a subclass of BP_SudsProDialogueRunner (recommended), these objects are automatically added as participants:

  1. The runner itself
  2. The player character
  3. Any NPCs listed in the runner properties

Runner properties

Therefore you should make your player character class and your NPC objects implement ISUDSParticipant, and probably also the character interface.

Adding participants to manually run dialogue

Participants should always be added before calling Start on a dialogue instance. Either you can create the dialogue, add the participants via AddParticipant, then call Start, or you can use one of the more convenient CreateDialogueWithParticipant[s] methods, which organise it for you and can still start automatically:

Create Dialogue With Participants


See Also