Add animations to scene change

Hy, how can i create an animation during an operation like the scene changing?

1 Like

If you want a simple animation like a fade in black one way to do it is to create an object sprite a bit bigger than your screen size add a Tween behaviour to the sprite, so when you decide given your events that the scene must change, then set object sprite to visible set opacity to 0 and add a Tween to opacity 255 with 1500 sec.
Then add another event when the object tween finishes
Do Change to Gamesce_xxx

2 Likes

Great. But ca i use layers to do an animation?

Thank you for the suggestion

This example is of an animation when the whole scene is visible and when player is in collision with an object, the sprite (that you have drawn) fades to black screen and takes the player to the next level.

Condition: Player is in collision with (ex: object next level)
Action: create object (your object) at position 0;0
(NB! on another layer and in front of all the other layers)
Action: Play the animation of (your object)
-New line
Condition: The animation of (your object) is finished
Action: Change to scene (ex: Next level)

The sprite i used for the transition to the next level was made up of 14 sprites to make a smooth transition from whole scene visible to black screen. (A sprite with the same size as the game screen size with a visible circle in it. The circle has black color around and the circle gets smaller by each frame until the circle is eventually gone and the screen is all black)

Hope this helps :upside_down_face:

Thank you, i Will try it