Forum rules - please read before posting.

Tries to cycle through inv even when that option is off

edited January 2021 in Technical Q&A

This problem started when I upgraded AC to 1.72.4 from 1.68.4.

I use Choose Hotspot Then Interaction and Cycling Cursor And Clicking Hotspot. Include Inventory Items in Hotspot Interaction Cycles? is not on.

However, if I have an item in my inventory that can be used on the hotspot, it cycles through the available interactions then cycles to the default cursor. It does not change the cursor icon to the inventory item, but if I click with the default cursor it cycled to, it uses the inventory item on it.

I made the following code changes to fix this. To Hotspot.GetNextInteraction() (and also a corresponding change to InvInstance.GetNextInteraction() which I won't post since you get the idea) You can see where I commented out parts of lines.

            if (i < useButtons.Count)
            {
                if (IsSingleInteraction ())
                {
                    i = useButtons.Count;
                }
                else
                {
                    i ++;
                }

                while (i<useButtons.Count && useButtons[i].isDisabled)
                {
                    i++;
                }

                if (i >= useButtons.Count) // + numInvInteractions)
                {
                    return FindFirstEnabledInteraction ();
                }
                else
                {

                    return i;
                }
            }
            else if (i >= useButtons.Count - 1) // + numInvInteractions)
            {
                return FindFirstEnabledInteraction ();
            }

Is there a better way to fix this without changing the AC code?

Unity version 2020.1.13f1

Comments

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.