Status text appear on specific position on viewport

  • #1, by nick-lSunday, 16. June 2019, 13:55 A year ago
    Hello,

    I want to include some keyboard functions that will disable or enable certain elements such as sound, text, etc.

    At the same time, I want to show a simple text message, something similar to "voices off". I tried to use narration text for that purpose and it worked but the problem is that it only works for scenes that do not include any scrolling.

    For scenes with scrolling the message may appear just fine when the character is at a specific point but in other cases, it will appear in the center of the screen.

    Is there a way to display this particular status messages in coordinates related to the viewport and not to the scene. Is there a better way to do it than narration text?

    If narration text is the only solution, is there a way to change its position with a script but that script would not affect the narration text, I am using in other places?

    Thanks any help will really be appreciated

    Newbie

    33 Posts


  • #2, by sebastianSunday, 16. June 2019, 23:54 A year ago
    the "easy non lua script" way would be to create an interface and use "display object text" for a button (with no graphic).
    Then display that interface whenever you want to show a text and then run the "display object text"  action.

    A more complex but dynamic way would be the use of lua script and the graphics.drawFont function.

    Thread Captain

    2337 Posts

  • #3, by nick-lMonday, 17. June 2019, 08:05 A year ago
    Thank you Sebastian. I was wondering if you could provide me some more help, please.

    I have created a new interface and a new button within it. I haven't used any graphics for the button. I then assigned this interface to my character. 

    Then from the "key actions" I chose the display object text action for the newly created button in my interface. I set the text, font and the screen coordinates but unfortunately, I get nothing.

    I am pretty sure that I haven't understood how that works correctly, so if you could please provide a couple of tips, I would be really grateful. 

    Thanks

    Newbie

    33 Posts

  • #4, by nick-lMonday, 17. June 2019, 08:49 A year ago
    Sorry my bad, I just realised that I have assigned the interface to wrong interface class.

    It worked, thanks a lot Sebastian.

    Newbie

    33 Posts

Write post