Forum rules - please read before posting.

Hotspot interaction without click

image

Hi all,
anybody knows if there is the possibility to start the interaction on a specific hotspot without clicking on it but just pass over the mouse cursor?

Like in the scene above (damn rat, he just run away after passing the mouse cursor over it several times!).

Thanks!

Comments

  • edited August 2015
    You would need to make a little custom script with on mouse hover that checks if your mouse hovers over your sprite/object and attach it to your sprite, then you can start you actionlist that you prepared in Unity with yourActionlist.Interact ();
    Smth like that:

    using UnityEngine;
    using System.Collections;

    namespace AC{
    public class StartActionlistOnMouseHover : MonoBehaviour {
    public Spriterenderer SpriteHover;

    void Start () {
    }

    void Update() {
    }

    void OnMouseOver () {
    if(SprietHover)
       {
        yourActionlist.Interact ();
       }
      }
     }
    }
    I haven't tried it and have some difficulties to adjusting to Uniy code from the previous engine I worked with but I hope this helps.
  • Thanks @SkyTree, looks a simple solution, i'll give it a try! ;)
  • I was just asking about this :P

    I wanted an animation to play when over a hotspot

    http://www.adventurecreator.org/forum/discussion/comment/8745#Comment_8745
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.