Forum rules - please read before posting.

Supporting Both Menus and Subtitle Skip

I have a menu and subtitle narration.  


The problem I'm having is that I'd like only the menu actions to run when the menu is clicked.  But, the subtitle narration also advances because of the "skip with mouse clicks" entry.

Is it possible to allow both "Can skip with mouse clicks?" and honor the menu's RectTransform boundary?  Or, is there another way to solve this so that the menu clicks just go to the menu?

Thanks in advance!

Comments

  • Welcome to the community, @mitchea.

    Can skip with mouse clicks? is just a convenience - you can still skip speech by invoking the SkipSpeech input, if defined in your Input Manager.

    Probably what you want is to just dynamically alter this checkbox - so that it turns off when the Menu in question is turned on, and vice-versa.

    To do that, you'll need an API reference to the field.  You can do that by right-clicking the field's label, but I'll paste it here too:

    AC.KickStarter.speechManager.canSkipWithMouseClicks

    Then write a new C# function that contains function to set this value to True/False, e.g:
    http://pasteall.org/559754/csharp

    Then add it to a new GameObject, and make that GameObject a prefab.  You can then call those functions on the prefab with the Object: Call event Action.  Define ActionList when turn on / off assets for your Menu, give them those Actions, and you should be able to change that setting dynamically when the menu turns on/off.
  • Ahh, got it to work.  I just added a "skip narration" button to the UI and hooked it up.  Here's how I did it in case anyone's interested:

    1) Unity Input Manager: defined a new input named SkipSpeech
    2) in the AC Menu manager, make sure the Subtitle menu has "Clickable in cutscenes" checked.
    3) in the AC Menu, add a button "element"
    4) link that button to the new UI button
    5) the AC menu button click type is "Simulate Input" and the Input axis is "SkipSpeech".

    I got most of this working pretty fast from your help, but then got stuck because I forgot the "Clickable in cutscenes".  The button was always disabled....

    Thanks again.  Have a great weekend.
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.