How do I create global object

Get help using Construct 2

Post » Thu Jul 16, 2015 9:42 am

hello evryone , i've created an array to store all of items of the player but i want to have the same array at every layout how did I do that ?
B
3
Posts: 4
Reputation: 185

Post » Thu Jul 16, 2015 9:49 am

An array is global by default (the common property Global), meaning it can be accessed on any layout. (The "Global" property is part of the "Object types properties" on the very top of the properties bar of any object type you select.

The thing is, make sure to execute first the layout that "fills" the array in your project.
From there, going from a layout to another, the array is accessible and its content is not modified (as long as your code does not modify it).
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
294
S
117
G
96
Posts: 7,313
Reputation: 71,094

Post » Thu Jul 16, 2015 10:56 am

thank you :)
B
3
Posts: 4
Reputation: 185


Return to How do I....?

Who is online

Users browsing this forum: Pandy and 11 guests