How do I add an array to a different layout?

Get help using Construct 2

Post » Sun Aug 17, 2014 3:45 pm

I have a layout called LayoutA where I created a new array object called LionArray. The array appears correctly in the "Objects" panel in Construct.

Now, I have another layout called LayoutB where I want to use the same array object. (not the exact same array, just another instance of that array). But I can't figure out how to put the LionArray into the layout.

I tried to drag and drop the the LionArray from the list of object in Projects pane, but this turns the cursor into a "forbidden" icon. It works fine for sprites, but not for arrays.

So how to I create another instance of the array in my layout?

(Of course, I could use the event "create a new object", but I really want to know if there's a way to do it from the GUI)

I know it's a very basic question, but I did take time to look on google, in the manual and in the forums. Thanks for you help!
B
20
S
5
Posts: 80
Reputation: 1,408

Post » Sun Aug 17, 2014 3:49 pm

I should add that my first array is not set to Global.
B
20
S
5
Posts: 80
Reputation: 1,408

Post » Sun Aug 17, 2014 8:01 pm

Use events - on start of layout, create object: your array - this is the only way I know of.
A big fan of JavaScript.
B
76
S
20
G
74
Posts: 2,254
Reputation: 46,482

Post » Mon Aug 18, 2014 12:07 am

Yeah, of course I know about this method, using events. But I want to know how to do it "manually".

I'm just curious really. I want to understand why my array is visible in the Objects panel on the first layout but not on the other. It seems to me like the array is somehow "attached" to the first layout.

I'm also worry about what would happen if the first layout gets deleted. Will the array still be accessible? Since Construct always need at least one instance of an object present in a layout to be able to spawn another instance of that object, how do I create that first instance if it gets deleted?
B
20
S
5
Posts: 80
Reputation: 1,408


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 21 guests