Forum rules - please read before posting.

Hotspot Delay

So I have a question. I have a unity ui buttons set up for interactions with custom button animations. 

However when I press a button to start the interaction like the talk or use interaction, the interaction menu disappears instantly and starts the action list. 

I want to delay the interaction starting so the interaction menu can show my button pressed animation. 

Comments

  • edited November 2017
    I have another problem. I'm trying to setup Unity UI prefab for dialogue list and its not working properly. 

    1. It tells me to assign only buttons which have the icons I want to appear. However only the dialogue text shows, no icon and It's set to show text and icon.

    2. After I exit the scene, the button values are unassigned

    EDIT: So this was fixed. However the remianing issue, is that while the text shows, it shows the dialogue number which I don't want to happen.

    It also doesn't even have any button animations and there's no delay between clicking a dialogue option and when the interaction starts

    EDIT2: I was able to button number issue by editing the script. 

    The only remaning issues are,


    - Delaying the hotspot interaction after button is pressed to show the button animation
    - In the dialogue conversation, when a button is pressed, the pressed option doesn't change color even after the "Mark options already chose is clicked"
    - When I pick 1 dialogue option, all button animation play instead of the one i picked
  • Please try to post separate issues in separate threads - it makes it easier for other users searching for answers to similar problems.

    Dialogue option numbers can be disabled by unchecking Prefix with index numbers? in the DialogList elements properties box.

    The Mark options alread used? option works by changing the "Normal color" in the UI Button component, which only shows if the Transition is set to Color Tint.  If you want it to work with another transition type, you can do it through custom script.  You can check if the active Conversation has had a given option chosen with:

    bool hasBeenChosen = AC.KickStarter.playerInput.activeConversation.OptionHasBeenChosen (i);

    Where "i" is an integer variable that represents the slot index number.

    If your button animations are wired up through Unity UI, check your Button's Target graphic.  This sounds like a Unity UI issue rather than AC.

    Delaying the removal of Interaction menus is not currently possible - there are issues involving e.g. repeated clicks of the UI on the player's part.  I will, however, consider its viability in an update.
  • About the delayed removal of interaction menus: actually I was over-thinking it.  If you set the Menu's Transition type to Custom Animation, then you can have an animation play by suppying clips of the names that then show.

    When an Interaction menu closes as a result of a Hotspot click, however, it does indeed disappear instantly - I shall address this in the next update.
  • I know about the menu transition but that is if you just walk away from the interaction without pressing anything. I have no problem with that one. 

    An interaction close menu delay after a hotspot click would be nice. Is there anywhere I can look at in the scripts? maybe I can make a quick fix for testing purposes.


    The prefix with index numbers showed buttons but no texts that's why I had to edit the script instead. I still haven't gotten the mark option already used to work yet but I'll try with a custom script.
  • The Menu being forced off, as opposed to fading out normally, when clicking a Hotspot is due to PlayerInteraction's line 2035 (in the most recent release):

    _menu.ForceOff ();

    To get a regular fade, call:

    _menu.TurnOff ();

    This is the change I believe should be made in the official release.

    If you want a different animation to play when turning it off as a result of this, probably best to invoke the OnHotspotInteract custom event to override which animation is played.  More on custom events can be found in the Manual as well as this tutorial.

    I'm afraid I can't recreate your "prefix numbers" issue - the default interface shows them as it should.  Does the issue occur for you if you load up the 3D Demo game (scene + Managers) and make the same change? (switch the Conversation's Source to Unity UI Prefab and enable prefixing)
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.