Forum rules - please read before posting.

Omitting Interactions in Right Click Cycling

Hi,

Our game has cursor behaviour similar to later sierra games such as KQ6, where right clicking changes the different interaction icons. However, certain cases, we would like to change which interactions are part of the cycle dynamically. For instance, while the inventory is open, we wanted to skip "talk" from the group of interactions that cycle, since we never have an instance when you "talk" to your inventory items, and there is only so much witty banter about it that we want to include. So is it possible to temporarily take "talk" out of the cycle?

Selene

Comments

  • It's possible to omit a cursor icon from the cycle via the Leave out of Cursor cycle? property, but this is intended to be a global property. If you wanted to leave an icon out temporarily, you'd have to do so via scripting.

    Right-click on the field's label to get an API reference that you can use to set its value through script.

    To sync it with e.g. the Inventory menu's visible state, you could hook into the OnMenuTurnOn / OnMenuTurnOff events, i.e.:

    using UnityEngine;
    using AC;
    
    public class DynamicTalkCycle : MonoBehaviour
    {
    
        int talkIconID = 2; // For example
    
        private void OnEnable ()
        {
            EventManager.OnMenuTurnOn += OnMenuTurnOn;
            EventManager.OnMenuTurnOff += OnMenuTurnOff;
        }
    
        private void OnDisable ()
        {
            EventManager.OnMenuTurnOn -= OnMenuTurnOn;
            EventManager.OnMenuTurnOff -= OnMenuTurnOff;
        }
    
    
        private void OnMenuTurnOn (Menu menu, bool isInstant)
        {
            if (menu.title == "Inventory") KickStarter.cursorManager.GetCursorIconFromID (talkIconID).dontCycle = true;
        }
    
    
        private void OnMenuTurnOff (Menu menu, bool isInstant)
        {
            if (menu.title == "Inventory") KickStarter.cursorManager.GetCursorIconFromID (talkIconID).dontCycle = false;
        }
    
    }
    

    However, do be aware that there does exist a separate interaction method that involves cursor cycling based on the currently-selected Hotspot or Inventory item, allowing for only valid cursor interactions to be shown. This can be set up with the following Settings Manager field values:

    Interaction method: Choose Hotspot Then Interaction
    Select Interactions by: Cycling Cursor And Clicking Hotspot
    Auto-hide Interaction icons based on Hotspot / item?: Checked

  • Thanks, Chris!

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.
Do NOT follow this link or you will be banned from the site!