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.
Comments
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.
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?
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?
The Menu
Setting Manager
The Conversation
b) Noted with thanks.
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?
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.
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?