Why Aren't My Actors Reseting?

I have 4 or 5 menu scenes and in the beginning of each one of them different actors will interpolate into the screen giving the game a nice smooth feeling. This works out great except for one thing. Sometimes, but not all the time, when I test it in ad hoc mode, If I go to a scene that I have already been to before the actors that are supposed to interpolate into the screen are already in the screen and right after they will go off the screen and then interpolate back into the screen. The actors should be set off the screen in the beginning, why are they not reseting themselves before I go back to the scene? Do I need to use the reset scene behavior or something?
Best Answer
-
jckmcgraw Posts: 647
@uhyana
I think it just has to do with the way it loads... I've notice things like that before. Here's what you could do so that people don't notice it:
Create an attribute called: game.change scene
Create a white actor that is bigger than the size of screen. Set its self.color.alpha to 1.
Timer: interpolate self.color.alpha to 0 in 0.4 sec.
Change attribute: game.change scene to false.
Rule: when game.change scene is true, change attribute self.color.alpha to 1 in 0.4 sec.
When you click a button that changes scenes (or a rule), have it change change attribute game.change scene to true. After 0.4 sec, change scene.
This way you will have the actors reset to ttheir off screen positions during the 0.4 sec it takes for the white actor to change its opacity, but it also will look good.
Hope this helps,
Jack McGraw
Answers
That's a pretty good trick! It should work for most of my scenes. Thanks!
Glad I could help. It seems to make the loading wheel fit into place better when it pops up when the screen is plain white. Another thing you could do is have it be a loading image instead of a white actor if your scenes take a while to load (you still need the image to have a non transparent background).
Regards,
Jack McGraw
I didn't even think of that. I really don't like the white loading thing and the white transitions will help them seem less noticeable. And I have been using some images to make the transitions from menus look seamless. For example, have the background zoom-in in one scene and then have that zoomed-in background in the next. They look seamless, except for the loading thing gives it away. I'll use that white transition trick for my other scenes.