Next scene after animation

IsabelleKIsabelleK Member, Sous Chef Posts: 2,807
edited November -1 in Working with GS (Mac)
Hello again,
Could you please help me with that - I have an animation (it's an intro to my game) on full screen, and I would like to change scene automaticlly, right after the animation ends. I've tried making a timer, but I can't match change scene time with animation. Is there any other way to do that?

And if You are so kindly, could you also tell me, how to center background in X and Y? I've tried many ways, but I can't fit it. Resolution of the image is 480x320.

Thank you.

Comments

  • quantumsheepquantumsheep Member Posts: 8,188
    To centre the background just halve the screen resolution.

    In the backgrounds 'properties', change x position to 240 and y position to 160.

    The easiest thing for your anim would be this.

    Make an integer global variable called 'Seconds'.

    Make an actor - call it 'Time keeper'

    In your actor 'Time keeper', have the following rule.

    Behaviour: Timer
    Every 1 second
    Behaviour: Change attribute
    game.seconds to game.seconds+1
    Behaviour: Display text
    game.seconds

    Make Time keeper's opacity = 0. This will make it an invisible box, but you will now be able to say the text displayed.

    (game.seconds is your global attribute - you enter it by hitting the little button next to the empty field and then clicking on 'game' - then the attribute - don't enter it by hand - pick it!).

    Now, put time keeper into your scene with your animation so that you can see it counting up while your animation plays.

    You'll then get a pretty accurate count as to how long your anim is.

    Then take out 'Time Keeper' and your animation have a timer that says 'after (however many seconds time keeper counted) go to next scene.

    Hope that helps,

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • IsabelleKIsabelleK Member, Sous Chef Posts: 2,807
    Thank you very much :-)
  • PhoticsPhotics Member Posts: 4,172
    MarcinMakaj said:
    I've tried making a timer, but I can't match change scene time with animation. Is there any other way to do that?

    The "Animation" behavior seems to be an advanced "Change Attribute" behavior. It's basically just swapping out images. So, use a "Rule" to change the scene.

    If self.Image contains name-of-last-frame.png then change scene.

    This technique could be modified to create sound effects to match your animations.
Sign In or Register to comment.