Fade one scene to another?
MLCinema
Member Posts: 133
Hello All,
Is it possible to add a transition from one scene to another? Such as a fade.
Thank you again.
Is it possible to add a transition from one scene to another? Such as a fade.
Thank you again.
Comments
Actor with no image, called Blackout,the size being the size of the screen you're working with, made black.
Another actor, "off-stage", (in each of your scenes) made an instance, with Rules: Spawn Blackout. Change attribute Blackout.Position.X (and Y) to suchandsuch. Interpolate Blackout.Colour.Alpha to 0 over how many seconds you want. this is the fade in. So in the Rules of the image Blackout put a Timer, after how many seconds, Destroy Actor.
The fade out will be triggered by a button or when a variable is a certain value, presumably. If it's a button for instance, in that's Rules, put: Spawn Blackout Change Blackout.Colour.Alpha to 0. Change attribute Blackout.Position.X (and Y) to suchandsuch. Interpolate Blackout.Colour.Alpha to 1 over same amount of seconds as the fade in.
The destroy blackout after so many seconds for the fade out might be more refined with a boolean attribute, so for instance, a button to go to another scene would be: go to Scene Whatever, change attribute game.FoutKill to true. In Blackout's rules, put when game.FoutKill is true, then destroy; setting the false at the beginning of the rules, if you see what I mean (top of the head stuff, this).
Although there might be a more straightforward approach to this, it works for me! Hope it helps.
:-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
So MLCinema, forget my first post, this was what I tried first a while back and realised the problem that way.
OK: game attribute (boolean) called FadeIn set to true
Actor with no image, called Blackout,the size being the size of the screen you're working with, made black.
in it's rules, put change attributes X & Y to centre of your screen. Rule: if FadeIn is true then Interpolate Alpha to 0 over 2 secs, change attributes X and Y to off-screen. That's the fade in.
If FadeIn is false then change attributes X & Y to centre of your screen; interpolate Alpha to 1 over 2 secs.
Place this onto every scene at the side of screen. (You could make it small and resize accordingly in it's Rules)
In button, for instance, change attribute to false, Timer after 2 secs go to next scene.
Think that's it this time!
:-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps