Geting lines count of TextActive

  • #1, z ke4Tuesday, 07. February 2017, 11:37 hodinky 8 years ago
    Hello guys is there a way to get the lines count? I know i can get the characters count but i can only guess how many lines will that make. Thanks smile

    Zabiják klíčů

    810 Posts


  • #2, z afrlmeTuesday, 07. February 2017, 11:40 hodinky 8 years ago
    Hello guys is there a way to get the lines count? I know i can get the characters count but i can only guess how many lines will that make. Thanks smile
    Not sure about that, but if you are forcing the line width in text properties by x characters then you could just run an additional query on the total amount of characters shared by the characters per line limit.

    Imperátor

    7285 Posts

  • #3, z ke4Tuesday, 07. February 2017, 11:42 hodinky 8 years ago
    I'm forcing the line width but it's not by x characters but by x pixels.

    Zabiják klíčů

    810 Posts

  • #4, z afrlmeTuesday, 07. February 2017, 11:48 hodinky 8 years ago
    Yeah, sorry. I forgot.

    You could always try forcing the lines manually. Anyway, what is that you are wanting to do?

    Imperátor

    7285 Posts

  • #5, z ke4Tuesday, 07. February 2017, 11:55 hodinky 8 years ago
    I'm positioning the text to the bottom of the screen. I have it 100px from the bottom. Looks good with 1 or 2 lines. When the text is longer it's too close to the edge or not visible at all.

    So i want the space between the last line and the edge of the screen always be the same no matter how many lines are there.

    Zabiják klíčů

    810 Posts

  • #6, z afrlmeTuesday, 07. February 2017, 12:09 hodinky 8 years ago
    I believe this is the reason why it's better to make sure everything fits on a single line. For ALLD demo we cut up the speech audio files whenever the total amount of text extended past 1 line & created multiple display texts instead. Overall it's a lot neater & cutting up the audio files in audacity isn't that complicated either - just required spending a bit more time than we would have liked is all.

    Imperátor

    7285 Posts

  • #7, z ke4Tuesday, 07. February 2017, 14:13 hodinky 8 years ago
    I have a long sentences sometimes. You think it's gonna sounds natural to cut it in the middle of sentence?

    Zabiják klíčů

    810 Posts

  • #8, z afrlmeTuesday, 07. February 2017, 14:54 hodinky 8 years ago
    Not really cutting it like that...

    If you display a text for as long as speech file lasts then immediately trigger another display text with a speech file it will play it instantaneously after the last one, so... the general idea is to cut it at the end of a word preferably just before the next spoken word in your sentence starts.

    I know it sounds like a strange thing to do, but it's all about where you snip up the speech files. It's really easy to pick out what is speech, background noise & silence by looking at the wave forms; especially if you zoom into them.

    https://i.gyazo.com/90f5fcab153bf0fe4bfd9078c2625f2b.png

    https://i.gyazo.com/44973a8bde39d81c57ca814f9af77b6e.png

    https://i.gyazo.com/d46853791e7df11736d029d7a8189381.png

    Imperátor

    7285 Posts

  • #9, z ke4Tuesday, 07. February 2017, 14:59 hodinky 8 years ago
    Ah okay i guess it would be nice to have the lines count thing but i suppose it feels better to read/see shorter texts though.

    Zabiják klíčů

    810 Posts

  • #10, z afrlmeTuesday, 07. February 2017, 15:13 hodinky 8 years ago
    Ah okay i guess it would be nice to have the lines count thing but i suppose it feels better to read/see shorter texts though.
    Yeah single line texts are much easier to read & much easier to handle.  wink

    Technically you can do them yourself inside of a single display text with a linked speech file, providing you know how long each line lasts in milliseconds (ms) - you would need to use Audacity or something similar to highlight that part of the file to find out the pause values you need then you could do something like...
    https://i.gyazo.com/bb2dcc6ef7295f325ba0eec9ef1407ed.png
    Adding a p tag inside of a display text then additional text after it forces it to display the text after a p tag after the previous text ends. You can essentially add as many as you like - it's most useful when using p on it's own to force left click skipping in games that don't have voice over recordings.

    Imperátor

    7285 Posts