Page 1 of 1

OnConversationLine not being called when expected

Posted: Wed May 01, 2024 9:51 pm
by xavibell
Hi,

Tiny issue I've run into (that is driving me crazy). The OnConversationLine() event, to my understanding, should run every line. Problem is, it isn't being called when either the subtitle's Actor or Conversant fields aren't set to the player.

This isn't ideal, since the project I'm working on has a lot of characters talking to one another and not the player. I could fix it by just setting the Conversant field to Player for every single entry, but that's no fun.

I don't recall having this issue until very recently, so I feel like I might've changed a setting somewhere by mistake.

Re: OnConversationLine not being called when expected

Posted: Thu May 02, 2024 7:55 am
by Tony Li
Hi,

OnConversationLine() is only called on the Dialogue Manager and the active conversation's two primary participants.

To check which GameObjects are being used as the primary participants, please see Character GameObject Assignments and also the logging & debugging video tutorial which will show you how to see which GameObjects are being selected at runtime to be the primary participants.

Re: OnConversationLine not being called when expected

Posted: Thu May 02, 2024 8:45 pm
by xavibell
That makes sense, but my problem remains, since I've got conversations with far more than two primary participants.

Is there a way to manually update the primary actors and listeners at runtime? Or is there just another way I should be doing this altogether? For context, the reason this is a problem at all is because I'm changing the dialogue text (colours based on who's speaking, graying older entries etc.) using OnConversationLine, so when neither of the primary conversation participants are the actor or conversant, everything breaks spectacularly.

Re: OnConversationLine not being called when expected

Posted: Thu May 02, 2024 10:50 pm
by Tony Li
Hi,

You can put your OnConversationLine(Subtitle) method on the Dialogue Manager and access subtitle.speakerInfo. That's what the example in How To: Color Actor Name and Indent Text does.