How do I Move Player to Another Layout Plus keep Variables

0 favourites
  • 3 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • 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!

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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)