How do I build a variable name?

Get help using Construct 2

Post » Sun Aug 28, 2016 2:55 pm

There's other work arounds to do this, but I'm trying to learn how to use functions efficiently. (and to learn the limits of Construct 2)

I want to create an object at (X,Y) where X = a variable named "POSITIONa" It's within a function that has a parameter of "a1"

So, I want to write this: Create object at ("POSITION" & left(Function.Param(0)), Y), which would return (POSITIONa, Y).

Is there a syntax to recognize the string "POSITIONa" as a variable once it's combined?
Posts: 17
Reputation: 259

Post » Sun Aug 28, 2016 3:14 pm

I don't think it's possible to dynamically build a reference toward a variable. However it is possible to build references toward a dictionnary's keys this way.
Posts: 56
Reputation: 2,240

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 41 guests