Different behaviours onconversationstart()

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Shinos
Posts: 59
Joined: Tue Jan 17, 2023 10:51 am

Different behaviours onconversationstart()

Post by Shinos »

Hi :) i need a little help...
So right now i have the player controller to be set as disabled OnConversationStart() so that the player does not move around when a conv. starts, but i was thinking to use the DM to also manage dialogues that don't stop the "action", like when talking to someone through a radio, or from far away, or just be able to walk around and be able to see the subtitles and audio of the current dialogue go on by itself like without the need of the continue button , is there already a direct/ simple way to manage different behaviours for the OnConversationStart for each dialogue or do i need to do a custom script?
I was already using the Timeline manager for manually controlling cutscenes, but i would like to avoid using the timeline manager also for handling this since it would be kinda of a waste (and annoying) to write a custom timeline for each dialogue, and the only different thing i need is the dialogue to go on with free control of the player, maybe the only other thing i would change is the Dialogue UI and the continue button...
so the tldr is this: how can i change the OnConversationStart() behaviour based on each dialogue (and also the Dialogue Ui)?
User avatar
Tony Li
Posts: 21681
Joined: Thu Jul 18, 2013 1:27 pm

Re: Different behaviours onconversationstart()

Post by Tony Li »

Hi,

OnConversationStart messages are only sent to the Dialogue Manager and the two primary participants' GameObjects.

If you put the OnConversationStart event on the player's GameObject, then conversations will only pause player controls when player GameObject is used as one of the primary participants.

If you run a conversation between two NPCs, the player GameObject won't receive an OnConversationStart message.

Similarly, you can make a radio GameObject that's separate from the player GameObject. For the radio, use this radio GameObject instead of the player.
User avatar
Shinos
Posts: 59
Joined: Tue Jan 17, 2023 10:51 am

Re: Different behaviours onconversationstart()

Post by Shinos »

That's pretty clever actually, thank you!
and what about switching Dialogue UI?
User avatar
Tony Li
Posts: 21681
Joined: Thu Jul 18, 2013 1:27 pm

Re: Different behaviours onconversationstart()

Post by Tony Li »

Hi,

Add an Override Dialogue UI component to the radio, etc.
User avatar
Shinos
Posts: 59
Joined: Tue Jan 17, 2023 10:51 am

Re: Different behaviours onconversationstart()

Post by Shinos »

Thank you!
User avatar
Tony Li
Posts: 21681
Joined: Thu Jul 18, 2013 1:27 pm

Re: Different behaviours onconversationstart()

Post by Tony Li »

Glad to help!
Post Reply