Adding array with no properties in r76

0 favourites
  • 9 posts
From the Asset Store
Supports 1D, 2D, 3D arrays. Import and export arrays in JSON format
  • I encountered a strange bug where creating a new object of array resulted in an array with no properties (Width, Height, Depth). After doing some more research into it, I've narrowed down the steps to cause it to occur:

    Steps:

    1. Create a new project

    2. Bring up the event sheet tab so that the Event sheet is active (as opposed to the layout)

    3. Right click Object Types and insert new object Array.

    4. Array will contain no properties, and under the Layout xml inside the capx file, the no-world instance xml will be blank <nonworld-instances /> instead of containing something like:

        <nonworld-instances>

            <instance type="array">

                <properties>

                   <width>10</width>

                   <height>1</height>

                   <depth>1</depth>

                </properties>

            </instance>

        </nonworld-instances>

    If the layout is the active tab at the moment of creating a new object array then the problem doesn't seem to occur.

    I've also included a sample capx project file with an incorrectly added array.

    Add Array Bug Project

    Hope this helps!!!

    -- cacotigon

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Bumping because i encountered this bug, this seem to be not only for array, i actually use rex_hash and a custom advanced array plugin and this bug prevent them to have properties and to work correctly too.

  • afgho: you shoudl report this in the topic of the plugins you are using first, to make sure it's not a part on their hand.

    It's probable since you're not using the built-in array plugin.

  • nah, it is the same problem as built-in array and i use it too

  • My project is having a similar issue. I was trying to create an array and kept getting responses as 0 regardless of how I set it up, and then I noticed in the properties window there were no height width or depth options available. When I create a different project and attempt to create arrays it works fine, but the project I've been working in does not let me create new arrays. This is my project file:

    http://dl.dropbox.com/u/30187917/test.capx

    I am using r84, but the file started in r82 I think. It's a tutorial I've been fooling with, so it's not a huge deal, but I would like to complete the tutorial and I need to create an array to do so. Any ideas?

  • Greg : fixed capx

    Your array "girls_response"'s instance did not exist in the layout.

    Actualy, the name of the array had been replaced with the object type ("Arr"). C2 tried to initialize an instance, but it didn't know what project object type to use. Quite strange.

  • Thanks Kyatric, I appreciate you looking into it for me, but were you able to create arrays with xyz properties in that file? I downloaded your fixed capx, but it will still not allow me to create an array with xyz properties. I reinstalled construct, but I still cannot add get an array to create with properties in that project. The "girl_response" array works fine for me, so maybe the issue with that array's name or instance placement, has caused my project to not allow the creation of arrays. Is it possible that the project is corrupt? I can start new projects and create arrays with xyz properties, and I can transfer them to my "gregs adventure" project, but when I save with the transferred array that contains xyz information construct crashes. I am ok abandoning this project, and will try to save more intermittently in the future, but I'd like to know what caused this issue to avoid it in the future.

    I realize the previous capx I posted didn't have an example of a bugged out array, just that in that capx the array could not be created, so I added a bugged out one and this is that capx:

    http://dl.dropbox.com/u/30187917/with_bug.capx

    The bugged array is "inventory" and the array created before the bug was "girl_response".

    As a note, the "girl_response" array was created before I installed the hash table and rex hash plugins. After installing those plugins the bug started happening (only in this project) and I've since remmoved those plugins but still cannot get arrays to create within this project with properties, but I can get them to create with properties in other projects.

    I am not blaming these plugins, but it's the only change in my environment between the creation of "girl_response" and "inventory"

    In the Mikeys Adventure tutorial theres a segment about creating hash tables, and rather then doing it with arrays I attempted to use those plugins, after researching the functionality of hash tables I decided to not use the plugins and attempted to use an array, and that is when I noticed that in my tutorial progress file I could not create arrays that contained properties.

  • could not create arrays that contained properties

    Greg: I've just opened the fixed capx, went into the layout "gregs_adventure2" and inserted an array in it.

    The new "Array" works as intended when I select it either in the project tab or the objects tab it is a regular instance, with properties.

    I really don't experience what you're talking about, and I don't think the project is corrupted, it works as intended here even after having saved to a new capx and opening it back in a new instance of C2.

    Also all the stuff about trasnfering arrays from another project is bad usage. You should report exactly the errors you get on crash though but it's definetely not the intended way to use it.

    Create arrays in the "final" layout directly, not elsewhere.

  • Also all the stuff about trasnfering arrays from another project is bad usage. You should report exactly the errors you get on crash though but it's definetely not the intended way to use it.

    Create arrays in the "final" layout directly, not elsewhere.

    Perfect man! Thank you so much! Believe it or not this solved my problem!

    It's good to know that transferring arrays between projects is bad practice, I hadn't tried it beyond test experiments but even in those I had inconsistent and crashy-results. I only tried this because in one project I (thought that I) could create arras in one project and wanted to see if those arrays with properties would transfer to another project.

    The solution here is "Create arrays in the "final" layout directly, not elsewhere."

    While in an event sheet view I was right clicking in the project list window under objects and selecting "insert object." to create my arrays. When I right click on the layout workspace and select "insert object" I am allowed to create an array with properties.

    Basically it looks like the bug occurs when you create an array to the project list window while viewing an event sheet tab.

    Does this happen to anyone else?

    It's really awesome to know that my scene wasn't corrupted, and that this is avoidable, thanks a million sir. <img src="smileys/smiley32.gif" border="0" align="middle" /> <img src="smileys/smiley32.gif" border="0" align="middle" /> <img src="smileys/smiley32.gif" border="0" align="middle" />

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