Transitioning from an overlay...

Hi all,

I’ve got a problem here…

From the main menu (a scene) I go to the game action screen using storyboard.gotoScene( “ActionScene”, { time = 500, effect = “crossFade” } ). That’s working fine. When the level finishes an overlay is presented.

The player then chooses to either exit or play again. When he chooses play again, I’m purging the Action scene and then doing storyboard.gotoScene( “ActionScene”, { time = 500, effect = “crossFade” } ) again. It’s

working, however, the effect = “crossFade” is completely ignored, it doesn’t happen! I think

that’s because I’m transitioning to the same scene (Action to Action)… well, some sugestions on

how can I solve that? maybe I’m doing everything wrong… is there a better way to do that?

All the best!

There is a known bug in Storyboard where storyboard.hideOverlay() does not do transitions.  This is fixed in the new version called Composer, but that’s only available to Pro and Enterprise subscribers through daily builds right now.  Even though you’re not calling hideOverlay, I think it gets called whenever a gotoScene() gets called.  Therefore the overlay scene doesn’t transition. 

Add to that the fact that you’re in effect reloading the same scene, which is already on screen, so you really can’t transition what’s already there.  I would suggest that you might not want this to be an overlay, but what’s referred to as a “Cut Scene”, an intermediate scene to show the in between level bits of your game.  Then you can do a proper gotoScene() back to your core game scene full on with transitions and you can easily reset the scene by removing it before you go to it.

Rob

Hi Rob, thanks again! I found another solution. For the scene transition to the ActionScene I did storyboard.gotoScene( “ActionScene”, { time = 0 } ), and in the ActionScene itself I’m displaying the view group using a transtition.to ( group, { time = 500, alpha = 1.0 }. Since it’s a requirement to always make this fade effect when showing the ActionScene, that’s OK too :slight_smile:

There is a known bug in Storyboard where storyboard.hideOverlay() does not do transitions.  This is fixed in the new version called Composer, but that’s only available to Pro and Enterprise subscribers through daily builds right now.  Even though you’re not calling hideOverlay, I think it gets called whenever a gotoScene() gets called.  Therefore the overlay scene doesn’t transition. 

Add to that the fact that you’re in effect reloading the same scene, which is already on screen, so you really can’t transition what’s already there.  I would suggest that you might not want this to be an overlay, but what’s referred to as a “Cut Scene”, an intermediate scene to show the in between level bits of your game.  Then you can do a proper gotoScene() back to your core game scene full on with transitions and you can easily reset the scene by removing it before you go to it.

Rob

Hi Rob, thanks again! I found another solution. For the scene transition to the ActionScene I did storyboard.gotoScene( “ActionScene”, { time = 0 } ), and in the ActionScene itself I’m displaying the view group using a transtition.to ( group, { time = 500, alpha = 1.0 }. Since it’s a requirement to always make this fade effect when showing the ActionScene, that’s OK too :slight_smile: