Assigning Responses to Specific Buttons?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Arkias
Posts: 8
Joined: Thu Mar 03, 2016 8:05 pm

Assigning Responses to Specific Buttons?

Post by Arkias »

Hey!

It's been a bit since I last posted, and I'm really grateful for all the help you've given me so far. I was just wondering if there was a way to alter where the responses go in regard to the button placement.

Looking through the Custom GUI skin, and the tutorial you did put on youtube, it suggests that Dialgue System uses them Sequentially; the top most being the first (Or button1, button2, button3), and the like.

However, what if you were interested in certain buttons only being specific to certain questions? All in all, I wanted to make a cleaner, reusable GUI;
So whereas having conversational options being listed 1-2-3-4 in the box be fine, during the 'trial' segments, it broke the flow of conversation.

So my idea was to redesign The Interface to work in 'two' systems. Since I'm not sure I can change the GUI mid game from "Day-Time" to "Trial-Time" and then back, (and If I can, that might make life easier), but assuming I couldn't --

How would you assign buttons to specific locations? For example, if it warrants only being part of the first four locations, to go there. But a specic question would only appear on the center of the screen. Things like that, I think!

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

Re: Assigning Responses to Specific Buttons?

Post by Tony Li »

Hi Ark,

Short answer: use the [position #] markup tag.

The response menu can use two kinds of response buttons:
  • Manually-positioned buttons: Assigned to the Buttons list.
  • Dynamically-instantiated buttons: Instantiated from the Button Template and parented to the Button Template Holder.
The [position #] markup tag specifies that a response should use a specific button in the Buttons list. For example:
  • Menu Text: "I'm eeeevil![position 3]"
would use the button in index 3 of the Buttons list. (A lot of games reserve one button position for "good" responses, another for "evil" responses, etc.)

The response menu will set up all responses with [position #] tags first.

For the remaining responses (those without [position #] tags), the Dialogue System will try to use the first available button in the Buttons list. If Button Alignment is To First, it will check button 0, then button 1, button 2, etc. If Button Alignment is To Last, it will check the last button and go backward from there.

If there are no available buttons in the Buttons list, it will instantiate a copy of Button Template.
Post Reply