Dialogue text position

  • #1, by marianna-lapinaMonday, 15. April 2019, 13:58 5 years ago
    I want the caracher text, and dialogue text to also be placed down where the object text is. Does anyone know how to do that? Thank you in advance!

    Newbie

    8 Posts


  • #2, by sebastianMonday, 15. April 2019, 14:25 5 years ago
    I want the caracher text, and dialogue text to also be placed down where the object text is. Does anyone know how to do that? Thank you in advance!

    there is a very old script example in the wiki for that:

    Should still work =)

    Thread Captain

    2346 Posts

  • #3, by marianna-lapinaFriday, 17. May 2019, 09:12 5 years ago
    It did work, thank you a lot. My next question is how to position the dialog options to be centered not aligned to the left? 

    Newbie

    8 Posts

  • #4, by afrlmeSaturday, 18. May 2019, 12:12 5 years ago
    I'm not sure that that's possible. I'm not seeing any options to center align them. I think Sebastian made a custom dialog script, maybe it's possible with that?

    Imperator

    7278 Posts

  • #5, by sebastianSaturday, 18. May 2019, 12:57 5 years ago
    it would be possible. Did a stream (in german) on twitch where I showed /programmed a new version (with some bugs in the stream).
    The gui based on display object text, so its possible to center it. 
    But i guess the stream video is not available anymore... 

    Thread Captain

    2346 Posts

  • #6, by blanoSaturday, 06. July 2019, 08:52 5 years ago
    hello everyone, i followed the Tut. to manage text position but now i've to reset text position to default, how can i?

    Newbie

    68 Posts

  • #7, by sebastianSaturday, 06. July 2019, 11:48 5 years ago
    hello everyone, i followed the Tut. to manage text position but now i've to reset text position to default, how can i?

    just check for a condition in your script and either activate or deactivate the repositioning by setting this condition to true or false.

    Thread Captain

    2346 Posts

  • #8, by afrlmeSaturday, 06. July 2019, 12:13 5 years ago
    Something along the lines of this...

    -- * function which updates the text position of displayed texts (character & narration) * --
    
    function txtPos(text)
    
    
    
     if Conditions["example"].Value then -- if condition "example" is true...
    
        text:setValue(VTextPosition, {x = game.ScrollPosition.x + (game.WindowResolution.x / 2), y = game.ScrollPosition.y + (game.WindowResolution.y - 85)}) -- define the new text position
    
        return true -- update text position
    
     end
    
    
    
     return false -- else don't update text position
    
    
    
    end
    
    
    
    registerHookFunction("setTextPosition", "txtPos") -- define the hook function for handling text position



    Imperator

    7278 Posts