LUA Script Request: General Function to fade a screen

  • #1, by marvelSaturday, 13. July 2013, 19:42 11 years ago
    I would like to realize a simple fade-out to black or white (without changing to a black or white room) via lua, for example to display texts, while the shaded room stays in the background.

    It seems to be a lot of effort to do that without lua: For each room i would have to create a huge black picture in full hd resolution (or use a smaller one while scaling it up to full hd via lua). This is not just a lot of effort, but also not very space saving.

    So... what about the chances to create a general function that uses 1 (!) pretty small PNG to be scaled up to the game resolution. This script could be used for each room that might need it.

    A must is, that opacity and fade-speed could be controlled in a variable.

    Key Killer

    598 Posts


  • #2, by afrlmeSaturday, 13. July 2013, 21:40 11 years ago
    create a new interface class & add a black or white image half the size of game resolution & then we can scale it up to 200% & fade in or out with Lua or with action parts.

    action parts are simpler for fading interfaces in/out.
    reason I said create a new class is because all interfaces assigned to x class will be affected.

    hmm good point though, I wonder if displayed texts are displayed in front of or behind of interfaces...
    I haven't actually thought of checking so it would be useful to know.

    action text etc does display in front of interfaces so I'm just assuming that character/narrator text will also display in front too?

    Imperator

    7278 Posts