Changing scene after an animation

I was just wondering on how I could make a scene change after an animation has finished occurring, I have a menu that when you click play the menu slowly fades out until it is transparent, and after the animation has finished I want it to go to the next scene.

Thanks.

Comments

  • KevinCrossKevinCross London, UKMember Posts: 1,894
    Change scene will change scene, but if you knew that and finding it's triggering before the animation had finished try putting a timer around the change scene behaviour to not trigger until after x amount of seconds
  • BBEnkBBEnk Member Posts: 1,764
    Put a rule that says when self.image = whatever image then change scene.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited September 2013

    Hi @MattyT

    As @KevinCross & @BBEnk suggests; heres' a bit more detail concerning Kevin's suggestion:

    (PS For the record, an image fading isn't animation in the GSC sense, but if you were using the Animate behaviour, add a Timer set to After as well, similar to below).

    Interpolate self.Menu.Color.Alpha to 0 Time: 5 seconds
    Timer After 5 seconds
    Change Scene

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • KevinCrossKevinCross London, UKMember Posts: 1,894
    Thanks @gyroscope. I got lazy as I've said it too many times :)
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited September 2013

    You're welcome, Kevin; and I know exactly what you mean... :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • SocksSocks London, UK.Member Posts: 12,822
    edited September 2013

    Hi @MattyT

    As @KevinCross & @BBEnk suggests; heres' a bit more detail concerning Kevin's suggestion:

    (PS For the record, an image fading isn't animation in the GSC sense, but if you were using the Animate behaviour, add a Timer set to After as well, similar to below).

    Interpolate self.Menu.Color.Alpha to 0 Time: 5 seconds
    Timer After 5 seconds
    Change Scene
    @gyroscope

    You can do this without a timer . . . (always nice to unburden GS of a timer)

    Interpolate alpha to -0.2

    Rule: when alpha = 0 then change scene


    The reason you'd want to interpolate to -0.2 instead of 0 is to avoid the annoying little glitch in the last part of a small interpolate range (like 0 to 1 or 1 to 0).
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited September 2013

    Yes, thanks for the reminder, @Socks. Maybe one day GS will finally fix that problem...

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

Sign In or Register to comment.