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
41
S
19
G
65
Posts: 1,085
Reputation: 37,842

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
65
S
17
G
8
Posts: 635
Reputation: 9,331


Return to How do I....?

Who is online

Users browsing this forum: Twili and 2 guests