Forum rules - please read before posting.

Objects highlight set to pulse as default behaviour

edited August 2018 in Technical Q&A
Hello Chris or anyone else who has experience with this.
I was wondering how to have all the interactable objects in my scene have their highlights set to pulse as their default behaviour and continue until the objects hotspot is disabled?

Comments

  • Just to expand and clarify, I did manage to get the behavior I wanted by checking Call custom events but the behavior seems to be overridden once the mouse cursor enters the game's screen space.
    https://imgur.com/phKSjxj

    I have read through the manual, video tutorials and this forum as well as looked into the Highlight script and the online scripting guide for answers but I’m still stumped.

    Any direction would be appreciated. Thanks.

  • Welcome to the community, @Matteu.

    Your event method fails because the Hotspot overrides control over the Highlight during gameplay.  The Pulse method will work fine during a cutscene, but once you enter regular gameplay, the effect is bound by the state of the Hotspot and will turn off when the Hotspot is not selected.

    In order to have a Highlight "pulse" continually, you first need to unset it from the Hotspot's Object to highlight Inspector field, so that it is no longer controlled automatically.  A simple custom script can then invoke the Pulse method when the game begins:

    AutoHotspotPulse.cs

    Attach that as a component on your Hotspot, and assign the Hotspot and Highlight components.  It'll then invoke Pulse when the scene begins, provided that the Hotspot is enabled.

    As for turning it off when the Hotspot is disabled: currently you'd have to invoke the Highlight's HighlightOff method at the same time the Hotspot is turned off.  This can be done with either the Object: Send message or Object: Call event Actions.

    I shall consider, however, providing an easier way through script via custom events that could run when a Hotspot is turned on or off.
  • edited August 2018
    Thanks for explaining Chris.

    FYI as my primary platform is mobile I wanted all interactable objects visible to the player within a set vicinity (room based), so rather than use icons or object labels; MultiHotspotLabel script (which introduces visual clutter as there are many objects at once) having the objects pulse best suited for this.
    I just thought this may be potentially helpful to others.

    Thanks again Chris and thankyou for creating a great product! :)
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.