Forum rules - please read before posting.

Play Speech + Audio (Custom Script)

Hey Chris, can you help me with this custom script (its working ok, but there is a problem with option "Treat carriage returns at separate speech lines", if you import that script and test it, it will do fine if you have that option disabled, but we have it enabled because we want to have only 2 rows for subtitles at time, so our dialogue texts are writen that way and separated with ENTER(break), the problem is when node comes to the first ENTER (break) subtitles wait for audio to finish and in the moment when audio is finished it will break all other till all text is shown and it will go on next node.

I only need that when it comes to ENTER that subtitles continues with text scrolling and its not going on next node if audio is not finish.


i will paste you snippet 

Here you can pull that and try... we really come this far and this is now a big problem for me so i would be very greatful if you can intervene.

Ps. i will delete snippet once you reply that you download it (didnt want to send some rar or zip files)

Thanks for your time, Andrej Soldo.


Comments

  • I can't go and debug custom code for you, but I can point you in the right direction so far as using AC's script functions go:

    The value you return from an Action's Run function determines how long to wait until AC re-runs it, so if you don't need the speech to be skipped when the player clicks, you look into replacing return defaultPauseTime (line 144) with return Mathf.Max (speechDuration, soundDuration);

    Otherwise, look into checking for your Sound's IsPlaying() function before returning 0.  The Action only ends once you return zero and set isRunning to false.

    Finally, it's a good idea to rename your Action's title (variable, script and class names) so that it doesn't get overwritten when you update AC.
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.