Status text appear on specific position on viewport

  • #1, by nick-lSunday, 16. June 2019, 13:55 5 years ago

    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


    49 Posts

  • #2, by sebastianSunday, 16. June 2019, 23:54 5 years 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

    2346 Posts

  • #3, by nick-lMonday, 17. June 2019, 08:05 5 years 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. 



    49 Posts

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

    It worked, thanks a lot Sebastian.


    49 Posts