Suggestion: Static Instance variable

Discussion and feedback on Construct 2

Post » Tue Jan 17, 2017 8:36 am

lets say we have many instances of object A and we want to store information about this object, that is the same for all instances.
using a normal instance will waste memory, because the same information will be kept for each instance.

one way to deal with this, is to use local static variable in a group, but the scope is now limited to the group.
other way is to create empty object called A_Static, and store the static vars there (A_Static has 1 instance)
another way is to use global variables.

best solution in my opinion, static instance variables.
B
41
S
16
G
7
Posts: 55
Reputation: 6,498

Return to Construct 2 General

Who is online

Users browsing this forum: db3344 and 17 guests