Array in container bug!

0 favourites
  • 6 posts
From the Asset Store
A well commented Dynamic Heart Containers template to learn from or to use as a base for your own game!
  • Problem Description

    Some weird bugs seem to crop up when an array is in a container!

    Attach a Capx

    https://1drv.ms/u/s!AhHSZHEulqh_ggjXgtvXjOTUxVzp

    Description of Capx

    array in a container, when object is created, it can't find the array or something.

    Steps to Reproduce Bug

    • run and get error

    Observed Result

    error happens

    Expected Result

    no error

    Affected Browsers

    • Chrome: (YES/NO)
    • FireFox: (YES/NO)
    • Internet Explorer: (YES/NO)

    Operating System and Service Pack

    vista

    Construct 2 Version ID

    244

  • Btw, I found this bug because I discovered that objects in the container weren't being picked when the array was picked. Or it wasn't picking the correct objects associated to the array..

    So it seems like a pretty significant bug- was very frustrating trying to figure it out.

    When I tried to modify the array when one of the container objects is created, it produced an error- so maybe that will help fix the issue.

    It might only happen when it is dynamically created at runtime.. I don't think it happens when objects are setup in the layout. but I'm not sure.

  • Don't forget you have a container that exists at the start of layout.

    That array is not implicitly picked by any condition, but neither are the ones just created.

    No idea where that 4th array is coming from.

  • newt , When an object that is part of a container is created in an event, all the other objects of that container get created as well. So you can immediately reference and work with the created objects. However, in this example it throws an error.

    btw.. just noticed that if you restart it, sometimes there is 1, 2, 3, or 4 arrays..!?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes, like I said though it's not implicitly picked by the condition, the creation event is expected to pick just the new ones.

    That may not be all that's happening.

    Objects referenced in actions and that are not picked by conditions default to the first instance.

    It's possible that the first instance is also being picked.

    But that's probably just a byproduct of a bug with containers and arrays.

    Note to Ashley.

    It doesn't seem to affect dictionaries.

  • Thanks, interesting find. Should be fixed in the next build.

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