OK, so can't there be two nodes? One that fades out and one that does stuff then fades in?
Doing something during LoadLevel while the screen is faded
Re: Doing something during LoadLevel while the screen is faded
Re: Doing something during LoadLevel while the screen is faded
Sure. If that fits your case, then the first node's sequence can be:
And the second node's sequence:
I had made the assumption that LoadLevel() was on the last node of the conversation. If it's the last node, it's a little more complicated because there isn't another node to run the Fade(in,1) command.
Code: Select all
Fade(stay,1);
LoadLevel(Bedroom)@1;
Continue()@2
Code: Select all
Fade(in,1); {{default}}
Re: Doing something during LoadLevel while the screen is faded
Ah, you're right. I have both situations, actually, so this helps for one of them. Thanks!
Re: Doing something during LoadLevel while the screen is faded
I added "unstay" to the Fade() sequencer command:
It works like Fade(in) except that if the screen is currently visible, then it will not fade from black.
DS_SequencerCommandFade_2019-06-17.unitypackage
This is how I set it up in my test scene:
1. Used this sequence:
2. Added this Dialogue System Trigger to the SceneFaderCanvas:
3. Configured the Scene Transition Manager's Enter Scene Transition > OnTransitionEnd() to trigger the Dialogue System Trigger:
You could just as well add it to the OnTransitionStart() event instead. I just happened to add it to the other one.
What this does: Whenever you load a new scene, the Scene Transition Manager will run Fade(unstay,1). If the screen is visible, it won't do anything. If the screen has been faded to black, it will fade back in to make the screen visible.
Code: Select all
Fade(unstay,1)
DS_SequencerCommandFade_2019-06-17.unitypackage
This is how I set it up in my test scene:
1. Used this sequence:
Code: Select all
Fade(stay,1,#ff0000);
required SetActive(New GameObject To Show, true)@1;
required LoadLevel(DemoScene2)@1;
Continue()@1
3. Configured the Scene Transition Manager's Enter Scene Transition > OnTransitionEnd() to trigger the Dialogue System Trigger:
You could just as well add it to the OnTransitionStart() event instead. I just happened to add it to the other one.
What this does: Whenever you load a new scene, the Scene Transition Manager will run Fade(unstay,1). If the screen is visible, it won't do anything. If the screen has been faded to black, it will fade back in to make the screen visible.
Re: Doing something during LoadLevel while the screen is faded
What does, "if the screen is visible mean?" What would it mean for the screen to not be visible?
Re: Doing something during LoadLevel while the screen is faded
The Fade() command creates a canvas at runtime. It keeps this canvas around for future Fade() commands, too.
The canvas has a fullscreen black image. When you fade out, it sets the alpha value of the black image to one, making it completely opaque. When you fade in, it sets the alpha value to zero, making it completely invisible.
"Screen is visible" is (poorly worded) shorthand for when the Fade() command's canvas alpha is zero -- that is, the canvas is not visibly covering the screen.
"Screen is not visible" means that the Fade() command's canvas alpha is one -- that is, the canvas is visibly covering the screen with the fullscreen black image.
The canvas has a fullscreen black image. When you fade out, it sets the alpha value of the black image to one, making it completely opaque. When you fade in, it sets the alpha value to zero, making it completely invisible.
"Screen is visible" is (poorly worded) shorthand for when the Fade() command's canvas alpha is zero -- that is, the canvas is not visibly covering the screen.
"Screen is not visible" means that the Fade() command's canvas alpha is one -- that is, the canvas is visibly covering the screen with the fullscreen black image.