Forum rules - please read before posting.

A very customized conversation menu

Hi, I am facing a challenge of making a very customized conversation menu. I wish to make it works like:

1. When it appears, the icons of all the conversation dialogue options are displayed.
2. And the selected option's icon is animated, while the other icons stay static.
3. Then a text box will displays the conversation dialogue option text, preferably having the text rolled out like the subtitle menu.
4. When the dialogue option is switched, the text box will also refreshed and roll out the text of the newly selected dialogue icon.

For point 2, how may I refer to the dialogue icons' Animate? option?
For point 3 & 4, I think I need to combine the use of Conversation Menu with a new Subtitle Menu, but I don't have a solid method in mind of how to achieve it.

Can you please guide me to the right direction? Thanks a lot.

«1

Comments

  • So the Conversation menu is made up of icons, and when hovering over them the full text is revealed?

    The Animate option allows you to define a mutli-frame image in the icon's texture field.  The options that then appear beneath allow you to determine the frame count, speed etc.  Only the highlighted option should be animated automatically.

    To react to the mouse hovering over a given option, you can hook into AC's OnMouseOverMenu event (see the Manual's "Custom events" chapter for more), i.e.:

    http://pasteall.org/946037/csharp

    Unfortunately, actually retrieving data about the Conversation option itself is a little tricky, so I'll add such a function as part of the next update - you can bump this thread when it's out and I'll advise further.

    Once you can access the Conversation option through script, you could then access the label text you enter in the Conversation Inspector (even if the Conversation menu itself only shows icons).  What you can then do is either display the text as scripted speech text:

    AC.KickStarter.dialog.StartDialog (null, "This is my speech text");

    Or, if you're using Unity UI, manipulate the contents of a UI Text box.
  • edited May 2018
    Thanks and thanks in advance again!
  • edited May 2018
    Hello. Thank you for the new v.1.62.6 update. Is it ready to support the retrieval of data from the Conversation options?
  • v1.62.6 was released before this thread was posted - it'll be included in the next one.
  • edited May 2018
    Hi Chris, thank you for the v.1.63.0 update. Can I now use MenuDialogList to retrieve the Conversation data? Can you please show me an example of how to correctly do it?
  • Thanks a lot! Should I attach the script to the canvas of the custom conversation menu?
  • The script above can go anywhere, since it doesn't actually affect or reference the UI, only AC's internal classes.  If you want to make changes to it to e.g. manipulate a text box on a UI Canvas, then yes - put it there.
  • Thank you for the script. But before I am able to test the script, I run into the problem of not being able to navigate the Unity Prefab conversation menu.

    I run into a similar problem before for the Inventory Menu before, and solved it by making the menu pause the game, or enable Control In-game Menu. But this time the Conversation Menu doesn't pause the game by default, and the methods I used before doesn't work. I also tried disabling the default Event System, check & uncheck the Ignore cursor click option. The Directly-navigate menus during conversation is checked as well.

    What else have I possibly missed?
  • And your Input method is set to Keyboard Or Controller?

    You'll also need to define which element should be selected by default.  This can be done by either checking Auto-select first visible Element? or explicitly defining a First selected Element name in the Menu's properties.
  • edited June 2018
    Yes my input method is set to Keyboard Or Controller?

    I also checked the Auto-select first visible Element? option.

    If I set the icon animation to always animate, the animation can be played in the menu. But otherwise no animation is played.

    Then by using the Mark options already used function, I realized I can actually use the arrow keys or WASD to browse through the icons. But the problems are:

    a) The icons' animation are not played even they are selected, although they can be played in the menu when set to always animate.

    b) I can use the "Enter" key to trigger the interactions for the selected icons, but the same cannot be triggered by the Interaction A button.

    What could be the possible problem?
  • a) I'll attempt a recreation - please post screenshots of your Menu's properties, as well as the properties of the DialogList element within it, and your Settings Manager.

    b) When navigating a Unity UI menu, the EventSystem is what determines which inputs are used.  By default, buttons are triggered with the "Submit" button - which is mapped to the "Enter" key.  You can either supply your own EventSystem prefab which instead relies on "InteractionA", or just re-map your Input Manager's "Submit" button to the same key as "InteractionA".
  • a) Thanks, here are the screenshots:

    The Menu

    image
    image


    Setting Manager
    image
    image
    image
    image


    The Conversation
    image


    b) Noted with thanks.
  • Thanks - I'll let you know if I need anything else.
  • If I give my game the same settings as per your screenshots, but change the Conversation menu's Appear type to During Conversation (which it should be set to), all works as intended.  Setting it to Manual causes issues.

    I don't know your reason for setting it to Manual, but for the moment it must be set to During Conversation - and you can lock/unlock it to control its display.  In the next update, you'll be able to manually assign a Conversation to a DialogList element through script, but this'll come with two caveats:

    1) The Appear type can't be set to During Conversation
    2) You can't rely on the "Override options?" feature of the Dialogue: Start conversation Action - instead, you'll have to define option responses in separate DialogOption ActionLists.
  • Unfortunately it still doesn't anime in my case, even I chose "during conversation". My custom UI structure is like this:
    image

    Maybe because my structure is wrong? Otherwise, could you please give me a working minimalistic simple example Unity package on such UI if it is not too much to ask for? So that I can plug it in and have a try?
  • It's hard to glean from the screenshot what could be wrong.  I'll prepare a package for you to compare with and PM you.
  • edited July 2018
    I got it, thanks a lot. But bad news, even I imported your package in a clean new project, with the latest AC downloaded & imported, the Bird icon still not animated.

    I suspect it is due to some Unity settings? I am using Windows 10, Unity Plus, and I tried Unity 2017.4.6f1 (64-bit) and Unity 2018.1.4f1 (64-bit). Any clue what possible settings would cause it to not work?

    Can you also tell me what part of the code handles the icon animation? I may try looking into the code to find the cause.
  • Or if there is no solution, can scripting be used as the last resort to control that:
    When the conversation option is selected, and if the conversation option's Animated option is true, that conversation option will switch Always Animate to true? And then back to false if not selected?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.