this.properties in runtime

For developers using the Construct 2 Javascript SDK

Post » Sun Aug 14, 2016 10:23 am

The properties in runtime cannot be accessed using their name ( this.properties["Target"]), as in edittime, why ?
Banned User
B
17
S
7
G
24
Posts: 388
Reputation: 14,494

Post » Sun Aug 14, 2016 12:04 pm

User number index like this.properties[0], this.properties[1]...
B
108
S
26
G
272
Posts: 4,471
Reputation: 152,277

Post » Sun Aug 14, 2016 8:26 pm

I know, what I meant to say is that the getproperty by name method is better than to get it by ID, for one reason: If you make changes in the properties table, the ids gets regenerated, this is bad because you have to edit all the lines containing this.properties[x] and reassign the ids ...
Banned User
B
17
S
7
G
24
Posts: 388
Reputation: 14,494

Post » Mon Aug 15, 2016 5:23 am

Because the minify. The global or private variables will be stored in array, too.
B
108
S
26
G
272
Posts: 4,471
Reputation: 152,277

Post » Mon Aug 15, 2016 10:16 am

Oh I see, thanks :)
Banned User
B
17
S
7
G
24
Posts: 388
Reputation: 14,494


Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 1 guest