Forum rules - please read before posting.

Skipping subtitles only

Is there a way to only skip subtitles when a button is pressed? As far as I know, the Skip ActionLst setting makes the entire cutscene skip instantaneously but I only want the dialogue to skip dialogue by dialogue.

Is checking for Input.GetDown() and then calling SkipSpeech continually the best way?

Comments

  • Check Subtitles can be skipped? in the Speech Manager. You can then skip speech with mouse clicks, or by invoking the SkipSpeech input.

  • Already done that. I was looking for something where I can press and hold a button to skip subtitles continuously. As far as I know with "Subtitles can be skipped? option, I have to press the left mouse button again and again.

  • See the Manual's "Remapping inputs" chapter. You can override AC's InputGetButtonDown function to have it return true when the "SkipSpeech" is held down, not just pressed (i.e. first frame).

    Something like:

    using UnityEngine;
    using System.Collections;
    using AC;
    
    public class InputOverride : MonoBehaviour
    {
    
        void Start ()
        {
            KickStarter.playerInput.InputGetButtonDownDelegate = CustomGetButtonDown;
        }
    
        private bool CustomGetButtonDown (string buttonName)
        {
            if (buttonName == "SkipSpeech")
            {
                return Input.GetKey (buttonName);
            }
    
            return Input.GetButtonDown (buttonName);
        }
    
    }
    
  • Finally got around to trying this.
    The game keeps crashing with ArgumentException: Input Button InteractionA is not setup.
    To change the input settings use: Edit -> Project Settings -> Input SkipManager.CustomGetButtonDown

    If I add one button, the game crashes again, but complains about a different button not being setup. (first it was ToggleCursor, then it was EndCutscene and now it's this)

  • You can either define the required inputs (they're listed in the Settings Manager), or wrap a try/catch statement around it, i.e.:

    try
    {
        return Input.GetButtonDown (buttonName);
    }
    catch {}
    
  • edited October 2021

    Hey, I'm trying to do the same thing, skipping subtitles fast when the space button is held down. But I'm having some errors. I tried defining inputs and wrapping a try/catch. Can you help me? I'm a noob and artist (just to know). :smile:

    I'm using V1.73.6

    https://ibb.co/LCHSpsS
    https://ibb.co/qx0NqkM
    https://ibb.co/WfDh7pk
    https://ibb.co/WyPM6Np
    https://ibb.co/vQ0Ky6G

    Thank you!

  • Replace:

    return Input.GetButtonDown (buttonName);
    

    with:

    try
    {
        return Input.GetButtonDown (buttonName);
    }
    catch {}
    
  • edited October 2021

    Thank you for your quick response Chris.

    Like this?

    void Start ()
    {
        KickStarter.playerInput.InputGetButtonDownDelegate = CustomGetButtonDown;
    }
    
    private bool CustomGetButtonDown (string buttonName)
    {
        if (buttonName == "SkipSpeech")
        {
            return Input.GetKey (buttonName);
        }
    
        try
        {
            return Input.GetButtonDown (buttonName)
        }
        catch {}
    }
    

    I have an error now: "not all code paths return a value". :neutral:

  • Add "return false;" just below the "catch" line.

  • edited October 2021

    Hm, now I have two errors. Sorry, I don't know what I'm doing...

    https://ibb.co/ZS1Yk91

    void Start ()
    {
    KickStarter.playerInput.InputGetButtonDownDelegate = CustomGetButtonDown;
    }

    private bool CustomGetButtonDown (string buttonName)
    {
    if (buttonName == "SkipSpeech")
    {
    return Input.GetKey (buttonName);
    }

    try
    {
        return Input.GetButtonDown (buttonName)
    }
    catch {}
    return false
    

    }

  • You're just missing the semicolon after the false:

    return false;
    
  • Thank you, and sorry for wasting your time :smiley:

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.