How to SET variable by it's Name?

Get help using Construct 2

Post » Wed Aug 19, 2015 1:13 pm

I read data from XML file. It's easy to get the Name of Global Variable and it's Value.
But, how to Set my Global Variable by Name in Event Sheet ?
In System -> "Set value" I can choose variables only from drop-down list. And I have no idea how to set Global variable dynamycaly in Event Sheet. Is it possible ?
Thanks for your help.
B
3
Posts: 2
Reputation: 179

Post » Wed Aug 19, 2015 1:53 pm

You can't set variables by name. I'd suggest using a dictionary, which associates values with string keys, allowing you to achieve what you want.
Moderator
B
113
S
41
G
20
Posts: 1,586
Reputation: 19,116

Post » Fri Aug 21, 2015 9:17 pm

Thank you for advise. I'll try to use dictionary.
B
3
Posts: 2
Reputation: 179


Return to How do I....?

Who is online

Users browsing this forum: odiusfly and 28 guests