Destroy actor. spawn actor. then change scene. HELP!!!

PL4YORDI3SONPL4YORDI3SON Member Posts: 10

Hey GS Community,

So i'm making my first game and its looking great! Only thing is, I ran into a problem thats got me at a stand still! :(
So when my actor gets killed, I have set up these actions to happen: Destroy actor, Spawn actor(animation), and play sound... Now here comes the problem. I want to change to the 'Game Over' Scene AFTER the animation and sound happen. So I tried setting up a Timer to change the scene but it just doesn't work. Ive tried it a couple different ways... Anybody know how to make this happen??? destroy actor. spawn actor. play sound. change scene?

any help would be appreciated!

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934

    Create a self Boolean attribute called nextscene then at the same time as your play sound behavior change self.nextscene to true.

    Out your change scen behavior inside a rule that says

    when self.nextscene is true

    • change scene

    If your sound is not getting out there all the way wrap just that change acne behavior in a timer

    When self.nextscene is true
    -- after 0.2 second run to completion true
    -- -- change scene

    Then play with the time setting as well to fit your needs.

    Hope that helps

Sign In or Register to comment.