Forum rules - please read before posting.

Specific unhandled interactions

Hi, I need help with a specific use case of the unhandled interactions for inventory items. I have deactivated the "Show Active FX when an Interaction is unhandled?" checkbox in the settings manager, as it was spoiling the locations of the hotspots in the game. So, right now the player only sees the highlighted inventory item when dragging to a correct hotspot, which is okay. Problem is, I can only use the unhandled interaction for all other hotspots, and I would prefer to make a different one in some cases, but if I do that, they get highlighted, as the unhanlded interaction is the only one that behaves differently. I thought of using "Hotspot: Check selected" in the unhandled interaction to separate them, but it's not doing anything.
Is there a way to do that inside the unhandled interaction? Or is there a way to make a specific interaction not use the Active FX?

Comments

  • If you want a reaction for a specific Hotspot / Inventory item combination, you're best of using a regular Inventory interaction, rather than an unhandled one.

    You can use a custom script, attached to the Hotspot, to temporarily disable the Active FX while it is selected:

    using UnityEngine;
    using AC;
    
    public class DisableInventoryFX : MonoBehaviour
    {
    
        void OnEnable()
        {
            EventManager.OnHotspotSelect += OnHotspotSelect;
            EventManager.OnHotspotDeselect += OnHotspotDeselect;
        }
    
        void OnDisable()
        {
            EventManager.OnHotspotSelect -= OnHotspotSelect;
            EventManager.OnHotspotDeselect -= OnHotspotDeselect;
        }
    
        void OnHotspotSelect(Hotspot hotspot)
        {
            if (hotspot.gameObject == gameObject)
                KickStarter.settingsManager.inventoryActiveEffect = InventoryActiveEffect.None;
        }
    
        void OnHotspotDeselect(Hotspot hotspot)
        {
            if (hotspot.gameObject == gameObject)
                KickStarter.settingsManager.inventoryActiveEffect = InventoryActiveEffect.Simple;
        }
    
    }
    
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.