I would like to give the users more control over dialog timing.
Display speech forever until user skips it option is very useful. In addition, would it be possible to have a "Repeat" button so that it replays speech for the subtitle currently displayed?
Comments
No. This is basically for people who want to hear the line more than once and don't want to automatically move to the next line.
How about 2 buttons: "Continue the dialog" and "Repeat the line"?
I think you'll be better off writing a custom script that looks for any currently-playing character audio, and re-playing it if it detects a mouse click.
currently-playing character audio, >> and re-playing it if it detects a
mouse click.
Yes, I think this would work. Is there some example code that I could look at? Also, I would prefer to trigger re-play with a button. We could disable the "re-play" button while the audio is playing to prevent spamming.
KickStarter.dialog.GetLatestSpeech ();
This page covers the public functions available in the Speech class. You should be able to get the audio clip by referencing the GetSpeakingCharacter () function, to get the character, then the AudioSource component, then the clip within it.
Know that you can also trigger an ActionList to call your script when the player presses a key - even during Cutscenes. This is the Active Inputs feature, and is covered in the Manual's Section 2.14.
the player presses a key - even >> during Cutscenes. This is the Active
Inputs feature, and is covered in the Manual's Section 2.14.
That won't work on mobile. Correct?
I have added a UI button, but how do I click on it during an Interaction? The cursor is not visible. Sorry, I must be missing something obvious
I have added a UI button, but how do I click on it during an Interaction? The cursor is not visible. Sorry, I must be missing something obvious
By default, the cursor'll be hidden whenever gameplay is blocked, but you can override this by defining a "Wait cursor" in your Cursor Manager.
I'm using Display speech forever until user skips it. Would it be possible to continue a dialog by clicking a button (UI or AC menu) instead of a mouse click?
Basically, you'd want to change any instance of:
KickStarter.playerInput.GetMouseState () == MouseState.SingleClick
with:
KickStarter.playerInput.InputGetButtonDown (axisName)
Where "axisName" is the name of an input axis. If you're simulating it through a button tab/click, you don't actually need it defined in your Input Manager. To link it to an AC button, create a new Button with a "Click type" of "Simulate Input", and fill in the fields beneath.
To link it to a UI button that isn't registered in AC's Menu Manager, you'll have to link it to run the following code manually:
AC.KickStarter.playerInput.SimulateInput (SimulateInputType.Button, axisName, 1f);
1. I modified Speech.cs script as you suggested. Should I do the same with the Version 1.50 or there's a way to accomplish this by changing some settings in the Editor?
2. Is it possible to toggle Display speech forever until user skips it during runtime?
2) You can write a script that changes it for you, eg:
void Update ()
{
if (AC.KickStarter.gameState == GameState.Normal)
{
// During gameplay
AC.KickStarter.speechManager.displayForever = true;
}
else
{
// During cutscene
AC.KickStarter.speechManager.displayForever = false;
}
}