Question about Dictionary

Get help using Construct 2

Post » Wed Jun 06, 2012 12:18 pm

I'm using Dictionary object and it's pretty good!

I wonder if the keys are local or global?

Small question: Do anyone using Dictionary for your game? hylists2012-06-06 12:24:03
B
19
S
5
Posts: 51
Reputation: 1,883

Post » Wed Jun 06, 2012 1:13 pm

The keys appear to be local to a specific layout unless you change Global to 'Yes' under the Dictionary properties.

I personally don't use it, as haven't had a use for it yet. If I start developing a new game though I'll probably use it as it looks like a much neater way of organising all your variables and offers some neat functions. Bit late to alter everything on my current game though! =PHaematite2012-06-06 13:13:32
B
22
S
6
G
10
Posts: 118
Reputation: 8,005

Post » Wed Jun 06, 2012 1:38 pm

Oh, can't believe i missed that little function, thanks @Haematite. :]
B
19
S
5
Posts: 51
Reputation: 1,883

Post » Wed Jun 06, 2012 1:43 pm

Data is stored in the object, so if the object is global all its storage is global too, and if not then it will be limited to a particular layout only.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Tue Jun 12, 2012 4:36 am

Glad I did a quick search before getting too frustrated - such an easy fix thanks @Haematite and @Ashley!
B
4
Posts: 6
Reputation: 487

Post » Wed Jul 18, 2012 7:34 pm

Ah me too, glad i did a search :)
B
16
S
4
G
4
Posts: 12
Reputation: 3,441


Return to How do I....?

Who is online

Users browsing this forum: jeffige and 0 guests