Reference instance variable via a string value?

Get help using Construct 2

Post » Thu Mar 16, 2017 1:28 am

I can't remember if this is possible, but I'd like to reference an instance variable without picking it. Such as sprite["variable"] where I provide a string.
also, would there be a way to assign to the variable in the same way?
B
48
S
23
G
66
Posts: 1,144
Reputation: 39,059

Post » Thu Mar 16, 2017 1:34 am

I would think so, I know you can make your own non-cycling UID this way by making an instance variable that increments for each new instance.. so don't see why you couldn't use a string tag. However, you would have to pick an instance to assign it a tag... otherwise what use would it be, if I understand correctly.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
71
S
19
G
8
Posts: 640
Reputation: 9,701


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 23 guests