Instance variable probelm

Get help using Construct 2

Post » Tue Nov 11, 2014 3:06 pm

hello there :) how do i create new instance variable for object in running game?
B
6
S
1
Posts: 53
Reputation: 506

Post » Tue Nov 11, 2014 8:17 pm

I am not sure this is possible with how Construct2 works.
Why are you needing to create an instance variable during runtime?
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
66
S
17
G
8
Posts: 637
Reputation: 9,370

Post » Tue Nov 11, 2014 8:47 pm

A somewhat hacky way to do that would be to use a container with said object, and a dictionnary. Adding a "new" instance variable would be as simple as adding a key to the linked dictionnary.
B
69
S
28
G
24
Posts: 977
Reputation: 18,739

Post » Thu Nov 13, 2014 12:05 pm

chrisinfinger wrote:I am not sure this is possible with how Construct2 works.
Why are you needing to create an instance variable during runtime?

because in this concept, players may add new vars to objects.
Magistross wrote:A somewhat hacky way to do that would be to use a container with said object, and a dictionnary. Adding a "new" instance variable would be as simple as adding a key to the linked dictionnary.

thanks. ill try it
B
6
S
1
Posts: 53
Reputation: 506


Return to How do I....?

Who is online

Users browsing this forum: David181 and 24 guests