Array Plugin corrupt in project

Get help using Construct 2

Post » Sat Dec 24, 2011 5:34 pm

I know it's x-mas and stuff...
However something got messed up with my project. Arrays just don't work at all.
The object does not even show it's properties (e.g. size).

Here is the corrupt project:

array_test

If I start a project from scratch doing the same things, then it works (shows hello world). The project is a striped of version of the project that I currently work on, so starting from scatch is not an option.

And merry xmas

B
34
S
8
G
6
Posts: 34
Reputation: 4,940

Post » Sat Dec 24, 2011 6:05 pm

There's an easy way to debug that.
- rename the .capx to .zip
- extract /Layouts/GameLayout.xml
- open it
- replace :[code]<nonworld-instances />[/code]by
[code]    <nonworld-instances>
        <instance type="MyArray">
            <properties>
               <width>10</width>
               <height>1</height>
               <depth>1</depth>
            </properties>
        </instance>
    </nonworld-instances>[/code] - Save
- Put this file back in the zip
- Rename the zip into .capx
- Open it and you should see you Array object in your GameLayout.

And Merry ConstructYann2011-12-24 18:06:14
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Sat Dec 24, 2011 6:19 pm

Thanks alot Yann, that saves me from using workarounds for this part.
I will file a bugreport though as this is just fixing a problem that should not be there. Also if I add new arrays I need to fix them as well...
B
34
S
8
G
6
Posts: 34
Reputation: 4,940

Post » Sat Dec 24, 2011 6:37 pm

If you add an array directly in your layout there shouldn't be any issue.
What you did is probably create an array in layout1 creating layout2 and deleting layout1
As you can't add an Array from the object list to a layout yet (because it's not a drawn object).
I think Ash already knows this one but it won't hurt to report it. It's weird that it's still there I think.Yann2011-12-24 18:37:48
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Sat Dec 24, 2011 6:41 pm

Hm, I created the array in my only layout. You can try it with the test project, it should fail even the way you describe it.
B
34
S
8
G
6
Posts: 34
Reputation: 4,940

Post » Sat Dec 24, 2011 7:06 pm

I added another array in your test project there's no problem. The array appears in the 'Object types' folder of the project as well as in the 'GameLayout' objects panel.
So you won't have any issue if you create new arrays.
If it's not as I described (creating a new layout and deleting the former one) I don't really know why you ended up as you did.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 26 guests