Multiplayer Synced conversations

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
nathanj
Posts: 303
Joined: Sat May 28, 2016 12:30 am

Multiplayer Synced conversations

Post by nathanj »

Hi Tony,

I'm making a simple little multiplayer game and I would like to because to sync the dialogue UI/conversations over the network. I'm using PUN2 atm but will probably change if the game progresses. But for now PUN2 it is.

I would like it that if one player opens a conversation then that conversation is opened for all players in the room and if a response button is selected then that selection is passed over the network.

Starting the conversation is farily easy to do through an RPC but for syncing the response buttons, I'm not totally sure about that and was wondering if you had a suggestion.

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

Re: Multiplayer Synced conversations

Post by Tony Li »

Hi Nathan,

Hook into the special script methods such as OnConversationStart, OnConversationLine(), and OnConversationResponseMenu():
  • OnConversationStart: Tell the other clients to pause and open the dialogue UI.
  • OnConversationLine: Pass the subtitle to the clients, and call the dialogue UI's ShowSubtitle method.
  • OnConversationResponseMenu: Pass the responses and show the response menu, but set the menu's Canvas Group > Interactable false so only the main conversation player can click it.
  • OnConversationEnd: Close the dialogue UI.
Post Reply