Create Object with Hierarchy doesn't always work.

0 favourites
  • 8 posts
From the Asset Store
This Girls Game allows young fashionistas to develop their taste and skills as a fashion designer.
  • Hi, I have a main layout (A), another layout (B) and a third layout (c)

    I have created a hierarchy in layout B and another different one in Layout C

    When I create the object with hierarchy from layout B in layout A it works fine. (using the 'Create Object' action) ie the object is created in Layout A with the same hierarchy as I built the object in layout B.

    ..but when I do the same with the object from Layout C the hierarchy is not created, only the base object.

    Anyone know what could be happening?

    Thanks

    EDIT: I even recreated the hierarchy of Layout C by hand in Layout A, but still only the parent object gets created when I use create object with 'Create Hierarchy' ticked in Layout A.

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Can you share your example project?

    I just tried doing what you described and it looks like it works fine. I tried with two very simple hierarchies in each layout, both of them a root instance with two children and each hierarchy uses a different object type for all of it's instances.

    Maybe there is something about the structures that you are setting up that is throwing off the creation process.

  • My project is around 20 meg. Is that okay? I can stick it on dropbox and give you simple directions to recreate the issue if I haven't already put you off :)

    Can I send you a link privately somehow?

  • You can send it to diegoATscirra.com with any additional information to reproduce the issue.

    Coincidentally someone sent their own massive project earlier so I could check out a very specific bug.

  • Great, I just sent you an email. Much appreciated!

  • In the end I 'hacked' it by creating a different root object and parent my model to that. With that it worked fine.

    I'd say there is definitely some issues with the scene graph. As well as the above issue, these things also happened seemingly overnight:

    1. I had a hierarchy which was being created perfectly. I saved everything, went to bed and in the morning after restarting C3 only the parent object was being created and it was also scaled up.?!? The code was/is exactly the same as yesterday.

    2.I created a hierarchy in one layout and then created it in code in another..once it came in WITH its tween behaviour (but this was scaled much bigger than on the initial sheet) but after restarting C3 the next day it comes in with no tweening at all.

    As far as I can tell there was no update this morning but maybe C3 updated itself during this time? I'm running r295 Beta

  • Additionally, if I turn off my original object's tweening, the tweening is still enabled when I create an hierarchy instance with code.

    ?!?

    Is some weird caching going on? ie Not retaining scales , if behaviors are enabled or an object's hierarchy etc

  • Ah I think I found it. It was picking the template from an old backup layout that I had. I 'think' it must pick the template from the first layout listed in the project directory because this morning I put all my old backup layouts into a subdirectory.

    I guess it was choosing a template from this layout instead of the layout I wanted because it was higher on the list.

    I just deleted the old layout and now it seems to be doing everything correctly!

    So the moral is: Check if you have any other instances of the object in your project, even on some unused layouts.

    Cheers

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