Debugging Conversations during runtime

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Alatriste
Posts: 181
Joined: Wed Nov 11, 2015 5:07 pm
Contact:

Debugging Conversations during runtime

Post by Alatriste »

Hi Tony,

Once my game is finished I'll need to give the build to some testers and I'm thinking about how to add a conversation selector that helps to jump to different conversations during runtime. I have in mind a way to do it with Playmaker, but it's rather tedious (a drop-down UI that fires up as many events as conversations I have, so I need to manually start each conversation one by one .) Is there a way to pass only the ID of the conversation? That I can save in an int variable.

Otherwise, can I suggest for future versions to add a debugger script to add to the scene so this task can easily be done by the non-programmer users? :P

Thanks!
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Debugging Conversations during runtime

Post by Tony Li »

Hi,

I'm not sure I understand. Can you use the Start Conversation action? (Sorry if I misunderstood what you want to do.)
User avatar
Alatriste
Posts: 181
Joined: Wed Nov 11, 2015 5:07 pm
Contact:

Re: Debugging Conversations during runtime

Post by Alatriste »

No problem. :)

I have to provide a way to my testers to jump to different conversations in the final build, like a cheating menu.
I think I can do it with Playmaker, but if I'm not wrong, I'll have to create as many events as conversations I have, as "Start Conversation" only accepts strings variables. So If I have 25 conversations, I'll have to create 25 different states, each with a different "Start Conversation".

I was asking if there is an easier way to do it.
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Debugging Conversations during runtime

Post by Tony Li »

In PlayMaker, you could fill a dropdown with conversation titles using the UI Dropdown Add Options action. When the player chooses an option, use UI Drop Down Get Selected Data to get the conversation title and store it in a PlayMaker variable. Then pass that PlayMaker variable to the Start Conversation action.

---

If you are getting an integer value from the beta tester some other, you can define a string array, such as:
  • [0] = "Conversation A"
  • [1] = "Conversation B"
  • [2] = "Conversation C"
  • etc.
When the player chooses a number, you can use the Array Get action to look up the conversation title. For example, if the player chooses 1, then Array Get will return "Conversation B".
User avatar
Alatriste
Posts: 181
Joined: Wed Nov 11, 2015 5:07 pm
Contact:

Re: Debugging Conversations during runtime

Post by Alatriste »

Thanks Tony!

Using the string variable did the trick. I was so focused on getting the int variable that I didn't even think about just passing the string value! :oops:
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Debugging Conversations during runtime

Post by Tony Li »

Great! Glad to help.
Post Reply