[R104] Layouts not duplicating arrays

0 favourites
  • 4 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • I'm not sure how to upload a demo of this, so I'll do my best to explain.

    1) Create a new project

    2) Add a sprite and an array to the layout

    3) Duplicate the layout.

    If you now compare the two layout XML files you will notice that the sprite was copied fine, but the array is missing in the '<nonworld-instances>' section.

    Side bug: If you have two pre-existing layouts and you add an array to your game, it is only added to the layout tab you have open (so you can have both layers open, but only the active one will get the array).

    If I manually copy the array XML to my new layer everything works fine.

  • Array is global by default, meaning it only needs to be on one layout. If it's on a second layout, you will silently end up with two instances, which could become very confusing. Are you sure you want this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Bah, I think I found what it was. Construct simply wasn't regenerating the XML file. Turns out, after duplicating layouts, you have be sure to save the project before you run it so it can recreate the XML. All other changes seem to be able to run directly without saving first. I think the whole array thing was just a red herring.

    Yep.

    Sorry Ashley, I was sure this was a bug...

    <img src="http://i.imgur.com/HGCgO.jpg" border="0" />

  • Yeah, nothing is actually written to disk until you press 'Save'.

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