Forum rules - please read before posting.

Marking conversation option's icon as "already used"

My game's conversation choices are not textual but square icons aligned horizontally at the bottom of the screen. This way whatever the player says comes somewhat as a surprise.

In a normal text-based conversation it is possible to "Mark options already used" with a different color. I'd like to achieve this same by either:

a. Changing the opacity of the used icon to - say 40%, or
b. Replacing the icon with another one, which would indicate to the player, that this has already been asked.

In this rough example the player has already asked the option 1, so it is dimmer than the others.

I'm a software designer by profession but I've chosen (Unity and) Chris's insanely accomplished Adventure Creator so that I could cut some corners and wouldn't have to learn to code more in my free time. But I fear I may have to get my hands dirty now.

So; how to change the chosen icon (or change the icon's opacity) at the end a conversation option branch?

Comments

  • Welcome to the community, @Untgrad.

    If you're using Unity UI to display your Menu (which I recommend in general), then the 'Already chosen' colour field should apply to Image-based conversations as well.

    This is because it works by updating the "Normal" colour of the linked Button component in your UI Canvas.

    It is also possible to determine if an option has been chosen through script. Hooking into the OnMenuTurnOn custom event would allow you to check if the Conversation menu has been turned on, and then read each option's "chosen" state:

    private void OnEnable () { EventManager.OnMenuTurnOn += OnMenuTurnOn; }
    
    private void OnDisable () { EventManager.OnMenuTurnOn -= OnMenuTurnOn; }
    
    private void OnMenuTurnOn (Menu menu, bool isInstant)
    {
        if (menu.title == "Conversation")
        {
            MenuDialogList dialogList = menu.GetElementWithName ("DialogList") as MenuDialogList;
            for (int i=0; i<dialogList.GetNumSlots (); i++)
            {
                bool optionAlreadyChosen = dialogList.GetDialogueOption (i).hasBeenChosen;
                UnityEngine.UI.Button linkedButton = dialogList.uiSlots[i].uiButton;
                // Update the UI accordingly
            }
        }
    }
    
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.