So let's say I have global variables abc1=13, abc2=27, abc3=40.
There are also numbers called "level" and "score".
Now I want to do this: "abc"&level==score instead of this abc1==score, abc2==score, abc3==score, but it does not work.
Instead of creating 3 events, I would like create one.
It's something like playing audio directly from name.
Obviously I can (and I know how to) use arrays, but in my case it's more practical to do this from separate global variables in this case.
Inb4 I tried searching for the answer, but I couldn't find it ^^ I did not know how to formulate this question well in the google.
Use a dictionary object to contain all of your variables, instead.
Develop games in your browser. Powerful, performant & highly capable.
No probs. The great thing about the dictionary object is you can save everything as JSON for game saves etc, as well as parsing through a sequence of variables as you describe. Using containers, you can give a dictionary object to each object/actor in your game....