On dialogue visibility

  • #1, by gregor-muellerTuesday, 05. October 2021, 18:57 2 years ago
    Hi, I have several characters which are constantly changing their visibility (think "ghost-effect"). The problem is that they also have dialogue. And now the text is also changing its visibility which makes it quite hard to read without getting a headache.
    Is there an easy/quick way to "lock" the text visibility?

    Thanks in advance!

    Newbie

    20 Posts


  • #2, by gregor-muellerMonday, 18. October 2021, 10:29 2 years ago
    Thanks so much, bot. Good to know our soon-to-be machine-lords care.
    But really though, no one who can help me? I feel like it should be something really easy, maybe a few lines of Lua. But I don't know where to start...

    Newbie

    20 Posts

  • #3, by afrlmeMonday, 18. October 2021, 11:40 2 years ago
    We talked to Simon about it, but the opacity of the text is currently tied into the visibility value of the character. Maybe he can implement an option to disable that, but I have no idea when or even if he'll do that.

    For now you could hide the text with script & redraw it with Lua draw, but it's not just a few simple lines of code as you seem to think as you need to hide the current text, specifiy the font to use, calculate the amount of lines of text there will be as well as the total width & height & then use that to calculate the position the text should be displayed on screen.

    Something you could look at is Sebastian's speech bubble script which you could either use or rewrite to suit your needs.

    https://www.youtube.com/watch?v=dn_X6OsozZI - german tutorial

    https://www.youtube.com/watch?v=wV6Fh_baPkk - english tutorial

    Imperator

    7278 Posts

  • #4, by gregor-muellerSaturday, 23. October 2021, 11:56 2 years ago
    Thanks for that! I will try to get my head around this today. I am already moving the text to a different position so it might not even be that much work - but I will see how it goes.

    Newbie

    20 Posts

  • #5, by gregor-muellerSunday, 24. October 2021, 13:14 2 years ago
    So I have recreated the tutorial yesterday and got it working but I had a bit of trouble incorporating it into some other scripts I have running. But in the end I realised that it would limit me a bit too much (the text being aligned to the left and the forced linebreaks - I should have paid attention at the beginning of the video!!).
    But then it dawned on me that there is a much easier way - though it's not really pretty I guess: I already have an interface with dialog portraits using afrlme's brilliant tutorial here: https://www.visionaire-studio.net/forum/thread/dialogue-box-...
    So all I did was add an object text that would update with the text of the characters at the same place. And with their font set to something invisible I have the animation of the characters speaking and the text is not "flickering" anymore. 
    Since I am using this in only a handful of short scenes I am soing this "manually" via the editor but I guess if someone was pursuing this further you could script something a bit more elegant.
    So in conclusion: thanks for the pointers, this can now be regarded as closed. Just wanted to let you know if anyone ever runs into a similar problem. Unlikely, I know, but maybe someone wants to make an adventure game with ghosts, so it might help...

    Newbie

    20 Posts