Forum rules - please read before posting.

Subtitles and speech

edited September 2015 in Technical Q&A

Apologies for the barrage of (possibly stupid) questions lately. I'm demoing my game at an expo for the first time next weekend, so I've got a lot of stuff to catch up on in a short amount of time!

I've just started implementing voice-overs in my game (currently just testing with text-to-speech), and I've noticed something odd about subtitles.

Let's say there are two different interactions, each with a dialogue -> play speech action. One piece of dialogue might be very short, just a second long, and another might be a few seconds long. If I activate the long dialogue, and then the short dialogue, the short one ends the long one's speech and subtitle - as expected. But it's as though the subtitle for the long dialogue is waiting in the background, ready to pounce: as soon as the short subtitle is finished, the long subtitle comes back to finish up its time, although thankfully with no speech attached.

So I end up with this from two interactions: [long subtitle] [short subtitle] [long subtitle comes back].

I hope I'm making sense. I'm kind of going mad at the moment :D

Here's a screenshot of my speech settings:

https://dl.dropboxusercontent.com/u/14522925/Images/Speech-settings.png

Oh, and another question: The option "Speech during gameplay can also be skipped": this means the player can click to dismiss any speech/subtitle that pops up, but if they're currently highlighting a hotspot (one with its own speech interaction), the click dismisses the current speech but doesn't then activate the hotspot as well. This causes an extra click and bogs down gameplay.

Basically I'd like the player to be able to dismiss any subtitles/speech by clicking arbitrarily, but if they're highlighting a hotspot, the single click should dismiss the subtitles and activate the hotspot. Is there any way around this?

Comments

  • Something I forgot to mention: I'm running all audio in the background, so as to not require any additional clicks from the player and to let them carry on with things while speech and subtitles play.

  • The long/short/long effect you're getting is actually as intended: playing a new line of speech won't "kill" any existing, so that if you have Duplicate for multiple lines? checked in your Subtitles menu, you can actually have multiple lines display at once.

    If you want to end all speech before a new one plays, you can use the Dialogue: Stop speech Action before starting the new one.

    As for the clicking speech issue, that's by design.  I'm undecided about whether that should change in AC / be an option, but removing this effect should be a simple matter of opening Speech.cs, and commenting out line 482:

    KickStarter.playerInput.ResetMouseClick ();

    That line of code essentially tells AC that the mouse click has been "used" to skip speech and can't be used for anything else.
  • edited September 2015
    Ooh, okay that makes sense from a design point of view. It does actually kill the speech component of the dialogue, though (if it's set up to automatically play audio files), and that audio component doesn't return.

    Thanks for the hack for the clicking issue. I'll definitely implement that and make a note of it so as to not lose that option with future updates.


    Edit: It's line 517 that needs to be commented out. Doing this actually solves both of my problems in one go, as both speech and subtitles are now killed when clicking on a new hotspot.

    Thanks Chris!
  • Maybe it's my fault, but now this method to use a single click for stop speech and activate a hotspot seems don't works... There's other things to do?
    Thank you.
  • @Ommariuolo: The ResetMouseClick() function is now called 4 times within that script - which one are you commenting out?  Try commenting out the others - the code's changed a little but the principle should be the same.
  • @Ommariuolo, I'm using a slightly outdated version (1.51g), but I commented out line 566 to achieve my desired result.
  • @ChrisIceBox: I've commented out rows 526, 531, 541 and 577.

    @GeometriX: in my code, row 566 is: EndMessage (true); 
  • @Ommariuolo: Try placing a Debug.Log statement inside the ResetMouseClick() function in PlayerInput.cs - you can then read off the Console the line number from which it's called when you click it at the appropriate time.
  • @ChrisIceBox: row 541. But I've solved my problem using a menu element displaying text, instead of dialogue. Now it's all ok. 
  • Hey gang, I know this is an old thread but I thought I'd pop back in here with an update for those still interested in putting this concept to use. As of AC 1.54c, you need to comment out line 586 to enable the "quick click-through of subtitle text".
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.