Forum rules - please read before posting.

Omit Main Cursor from Cursor cycle.

Hello. Hoping to get some guidance to omit the Main Cursor from the Cursor cycle.
Interaction method is Choose Interaction Then Hotspot.
Cycle Interactions with right-click? and Include last-selected Inventory item in cursor cycles? are checked.
I tried editing the PlayerCursor script, considering that the Main Cursor ID is -1.
It somehow works but now the last-selected item is not part of the cycle. And I'd like to keep that feature.
Thanks !

Comments

  • You shouldn't have to resort to editing PlayerCursor - you can hook a custom script into the OnChangeCursorMode custom event.

    Something along these lines:

    using UnityEngine;
    using AC;
    
    public class BypassMainCursor : MonoBehaviour
    {
    
        void OnEnable () { EventManager.OnChangeCursorMode += OnChangeCursorMode; }
        void OnDisable () { EventManager.OnChangeCursorMode -= OnChangeCursorMode; }
    
        void OnChangeCursorMode (int cursorID)
        {
            if (cursorID == -1)
            {
                KickStarter.playerCursor.SetSelectedCursorID (0);
            }
        }
    
    }
    
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.