Global Array Question

Discussion and feedback on Construct 2

Post » Sat Apr 20, 2013 10:38 am

Ok, so I set an Array object to "not global" and my script didn't work as expected. I changed it back to "global" and everything was fine. My question is, how does that setting effect the array? I don't need it persisted across Layouts (although it's not a problem to delete all items on start of a new Layout.
Jack of all trades, and master of some.
B
29
S
9
G
7
Posts: 174
Reputation: 7,601

Post » Sat Apr 20, 2013 2:38 pm

If you set it to be non-global, it only exists on the layout it was placed on. Since there's no good way to see in the editor which layout that is, they're all global by default, and you should only really use them like that. It's a bit of an oversight of the design of C2, but when they're global it should be fine.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Sat Apr 20, 2013 7:43 pm

Ok good to know, I expected as much, no worries. :)
Jack of all trades, and master of some.
B
29
S
9
G
7
Posts: 174
Reputation: 7,601


Return to Construct 2 General

Who is online

Users browsing this forum: BBaller1337, Danwood and 15 guests