Question about Layouts.

0 favourites
  • 7 posts
  • My game is similar to this ghost shooter game.

    Assuming this is my game and this is layout 1; (The one on the screenshot.)

    I wanted to go to layout 2 when I shoot the monster (the one with the red circle).

    And I did.

    But, my problem is I want to go back to Layout 1 without restarting. Just like pause.

    Is it possible that if I return from layout 2, my layout 1 will resume.

    PLEASE HELP. Thanks

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Screenshot

  • You can try using a global variable. Set the global variable to a new value if you hit that specific monster. then at start of layout 1, create 2 sub-events checking the global variable's value. Do the actions you want to happen (start anew or resume) depending on the global variable (the 2 sub events). You might also want to read about Persist behavior (but I haven't used this behavior myself, so I don't know if it fits your problem)

  • What you want is the Persist behaviour. You'll probably have to manually record things like scrollX and scrollY as well. Check the example that come with Construct in the new project dialogue.

  • Thanks to both of you. I'll try it now

  • I'm so noob I can't seem to understand how to use/set persist

  • There's nothing really to it, just give an object the Persist behaviour, and then its settings/placement/etc. will persist (i.e.: remember) when you switch layouts. What are you struggling with, exactly? Did you look at the example that come with Construct?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)