Forum rules - please read before posting.

Hotspot Events on MouseOver?

I'm looking at doing a sprite transform when I mouseover a hotspot on said sprite. The closest thing I've found is the ability to turn on a highlight (although I have not gotten that to work either yet). But ideally I'd like to run an action list on mouseover of hotspot. Is anything like that possible? Thanks in advance!

Comments

  • You can hook into the OnHotspotSelect event - see the Manual's "Interaction scripting" and "Custom events" chapters for more.

    From within the event, you can run an ActionList by invoking its Interact() method.

    Something like this:

    using UnityEngine;
    using AC;
    
    public class HotspotEventTest : MonoBehaviour
    {
    
        public ActionList actionList;
    
        private void OnEnable ()
        {
            EventManager.OnHotspotSelect += MySelect;
        }
    
        private void OnDisable ()
        {
            EventManager.OnHotspotSelect -= MySelect;
        }
    
        private void MySelect (Hotspot hotspot)
        {
            actionList.Interact ();
        }
    
    }
    
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.