'Meanwhile/After some time' cutscenes

  • #1, z dionousTuesday, 14. March 2017, 08:00 hodinky 8 years ago
    Hello to all!

    Trying to find the best way to implement the following:

    - Char performs an action
    - Screen goes black and a Text appears for xx seconds (e.g. 'After some time...')
    - Light is back and action resumes in same scene.

    Tried to play around with brightness but 1. it doesn't come with fade in/out, 2. i guess the narration text will be dark also.

    I thought perhaps the best way would be to have new scene for this? I searched in the forum and i encountered some suggestion like to have a black.png as object and play with the visibility but it seems a bit troublesome.

    Any ideas welcome!

    Fanoušek fóra

    246 Posts


  • #2, z sebastianTuesday, 14. March 2017, 08:21 hodinky 8 years ago
    Hello and welcome to the forum smile 

    i would suggest to make a new scene which has a dark (black) background. Then when you need this, just SHOW (not switch to) the black background scene and show a narration text, then again SHOW the current scene the character is in. 

    By default the scene transition should already fade in/out black if you not changed the value in the game settings. 

    kind regards 
    Sebastian 

    Kapitán

    2346 Posts

  • #3, z dionousTuesday, 14. March 2017, 09:23 hodinky 8 years ago
    Yes it seems this is the best solution, thanks Sebastian!

    rgrds,
    chris

    Fanoušek fóra

    246 Posts

  • #4, z afrlmeTuesday, 14. March 2017, 12:36 hodinky 8 years ago
    Aye what Sebastian said is probably the simplest solution, but you can fade the scene brightness too; though it requires using the to() Lua script tweening function.
    game.CurrentScene:to(500, {SceneBrightness = 0}, easeQuintOut) -- easing is optional

    Display text, narration text & object text would still display as they are not tied in with the scene or even global brightness values.

    Another alternative would be to create an interface & add the background as a solid black image then create some buttons & add some images to them of the meanwhile texts you want to show. Create some conditions & assign one to each so you can toggle which text should be displayed. You would call the interface when you need to display it, update the conditions & fade it in & out with Lua script. However you could do the same thing with a single menu type scene as Sebastian said... I'm talking about using a single scene with multiple text images & using conditions to determine which image/animation should be displayed.

    Imperátor

    7285 Posts

  • #5, z sebastianTuesday, 14. March 2017, 13:15 hodinky 8 years ago
    the lua thing is also great! very small footprint because of less configuration smile 

    Kapitán

    2346 Posts

  • #6, z dionousTuesday, 14. March 2017, 15:28 hodinky 8 years ago
    Thanks for the Lua tip also, cool indeed! smile

    Just a note though: the particular scene has particle effects (snow) applied, it seems that brightness will not affect the particles which will continue to be visible; also, so far i have not found a way to stop the particles with an action part (maybe i'm missing smth here - maybe with lua?).

    Fanoušek fóra

    246 Posts

  • #7, z afrlmeTuesday, 14. March 2017, 16:23 hodinky 8 years ago
    Thanks for the Lua tip also, cool indeed! smile

    Just a note though: the particular scene has particle effects (snow) applied, it seems that brightness will not affect the particles which will continue to be visible; also, so far i have not found a way to stop the particles with an action part (maybe i'm missing smth here - maybe with lua?).
    If you assign the particles to a scene object & then assign a condition to the properties tab of said scene object, you can hide/show the particles by toggling the condition.

    As for stopping a particle system directly applied to the scene properties tab; there doesn't seem to be an action part for that & according the data structure page on the wiki, it's not scriptable, which means it might not be possible to change with Lua script either - basically it means that it may be possible to temporarily change it, but the new data doesn't get written into save data when a player creates a save game. Then again, it might not be scriptable at all - some fields aren't (more a case of trial & error to see what happens if you try editing an unscriptable data structure field).

    Imperátor

    7285 Posts

  • #8, z dionousTuesday, 14. March 2017, 17:06 hodinky 8 years ago
    Appreciate your detailed reply, it's getting clearer now!

    Fanoušek fóra

    246 Posts