Forum rules - please read before posting.

Control how many verbs are illuminated (Nine Verbs Interface)

Hello! I've been looking through the forums and haven't seen anything similar, so I made this post.

When using the Nine Verbs Interface, when you pass over a hotspot it highlights the first action possible on the UI. However, I would like to be able to adjust the amount of verbs it highlights, so it can display all of them, zero, etc.

Sadly I've looked through the code but haven't found anything, which is why I'm making this post hoping I can get some direction on where this is happening code wise.

Comments

  • edited July 2024

    The highlighting occurs in the NineVerbsInterface script, around line 90. Iterating through each MenuInteraction element, it updates the colours based on the element relying on the active Hotspot's default icon:

    verbElement.uiButton.colors = (verbElement.IsDefaultIcon) ? highlightedColorBlock : normalColorBlock;
    

    To have this work for each available icon, you'd need to:

    • Get the current active Hotspot
    • Iterate through that Hotspot's available interactions
    • Compare each interaction's ID with the element's icon ID

    Something along the lines of:

    bool showHighlight = false;
    Hotspot hotspot = KickStarter.playerInteraction.GetActiveHotspot ();
    if (hotspot)
    {
        foreach (var useButton in hotspot.useButtons)
        {
            if (!useButton.isDisabled && useButton.iconID == verbElement.iconID)
            {
                showHighlight = true;
            }
        }
    }
    verbElement.uiButton.colors = showHighlight ? highlightedColorBlock : normalColorBlock;
    
  • ¡Hi!

    Sorry for the late delay, quite busy, but just wanted to pop by and say this worked wonders, thank you!

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.