Text screens

  • #1, z nmvhFriday, 20. May 2022, 16:22 hodinky 2 years ago
    Suppose that at some points during the game, the gameplay is put on hold, and some mood setting prose is written against some image background, or just some black background.

    The text presented on screen should be of a certain font of my choice, and I may want to ease in the text by manipulating the transparency.

    What would be the most effective way to accomplish this?

    Bažant

    38 Posts


  • #2, z afrlmeFriday, 20. May 2022, 17:26 hodinky 2 years ago
    Three options come to mind.

    1. Create the text as an image, add it to an object/button & adjust the opacity of the object/button.

    2. Create a display object text & link it to a button or scene object. Same deal as before, adjust opacity of the object/button the text is linked to.

    3. Use Lua draw to draw the text, or use the textPane function, however those are both more complicated to use & require scripting.

    Imperátor

    7285 Posts

  • #3, z nmvhFriday, 20. May 2022, 19:44 hodinky 2 years ago
    Using images for the texts would be straightforward, but maybe result in a large build if the game is text-heavy.

    What about the action "Display narration text"?

    Bažant

    38 Posts

  • #4, z afrlmeFriday, 20. May 2022, 20:00 hodinky 2 years ago
    Display narration text works like display text. Better option would be display object text found under miscellaneous actions. It doesn't generate a cutscene & will remain visible until you tell it to go away, & it's also linked to the parent object which means that certain things you do to the parent object such as changing the opacity of it, or moving it around, etc. should also affect the text too.

    Imperátor

    7285 Posts

  • #5, z nmvhSaturday, 21. May 2022, 07:02 hodinky 2 years ago
    Ok, so I stick to display object text, and it seems to work as I intended. Great!

    In the menu I use as the holy grail reference of Main menus (afrlme's "advanced_menu_example.ved") there seems to be an "easing in" effect when setting object visibility. I'm thinking specifically about what happens when the cursor enters the object area of a menu item. The visibility of a certain text border seems to go from 0 % to 80 % during the course of about 300 milliseconds. How can I achieve a similar effect?

    EDIT: Sorry, found the DELAY setting that does just that.

    Bažant

    38 Posts

  • #6, z afrlmeMonday, 23. May 2022, 11:33 hodinky 2 years ago
    I was wondering how long it would take you to realize you had answered your own question. smile

    Imperátor

    7285 Posts