X
XirmiX
Guest
For my game that involves networking, all I've been doing in terms of vital data storage and retrieval is just create some ds_maps (They may be tedious sometimes, but I like them, now that I fully understand them) and store various pieces of data as keys and their values in various different ways. With that, I've been able to create an interesting system, but currently, I think mys system would be unplayable ad I'm trying to make a break-through up until you can shoot things and for them to show up on the client as well with this version of the build. Anyway...
In case of an integer, floating point or a boolean, I understand, this wouldn't be possible, due to the way GML is structured and for no way of the program to distinguish between whether you're looking at something as a variable name and its value or a new value in specific situations. But in the case of a string...
Lets say I have variable str_variable_1 declared to a string value of "this_string":
Could I then create a new variable, or in my specific case, a list that is called the same as the value of that variable? So, I would in the end have:
But of course, I couldn't simply write "this_string" as the variable name, I mean, some way of taking the value of a variable. May be something like:
Not entirely sure if this is relevant, but I found this, and it might just be that this is not possible. Wish it was, I mean the value thing could make a lot of sense, could it not?
In case of an integer, floating point or a boolean, I understand, this wouldn't be possible, due to the way GML is structured and for no way of the program to distinguish between whether you're looking at something as a variable name and its value or a new value in specific situations. But in the case of a string...
Lets say I have variable str_variable_1 declared to a string value of "this_string":
Code:
str_variable_1 = "this_string";
Code:
"this_string" = ds_list_create();
Code:
str_variable_1.value = ds_list_create();