How do I Move Player to Another Layout Plus keep Variables

0 favourites
  • 3 posts
From the Asset Store
Players follower. use it for anything which follows the player
  • How do I Move Player to Another Layout Plus keep Variables

    My code

    ------------------------------------------------------------------------------------

    [E is Down] [System Go to Layout 2]

    [When overlapping Object]

    ------------------------------------------------------------------------------------

    It does switch layouts but the player is not shown and the Layout and the Variables reset

    Please send a capx file if possible!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey there,

    So I would guess that you're using variables that are specific to the player object itself?

    There are two things you can do:

    1)Set up an array with all your variables (as it would be global), and then have your player variables populate from the array. This way, no matter which layout your player goes to, it will always maintain it's variables. (Although, if you did this, you might as well just cut the player variables out altogether as it would be an unnecessary intermediary container for the variables)

    2) Switch to global variables, as they won't be changing from layout to layout, unless you have a "reset global variables" action set up.

  • Please send a capx file if possible!

    Please provide your current project first so we can build on top of it.

    Anyway, ultrafop's answer is correct and is the theory on how to go about what you asked.

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