I ws wondering about something like this as well, but I haven't figured out how to do this in GS2.
I wanted to get something like this below, but in gs2.
NPC Code:
// GS1
setstring myvars,apple,banana,fruit;
for ( i = 0; i < sarraylen(myvars); i ++ ) {
setstring this.varname,#I(myvars,i);
setstring this.#s(this.myvarname),#v(random(1,10));
}
Probably a bad example, but I haven't found a way to do this with GS2 and I'm effed since I have no where to script & test online.
edit: Someone told me about a makevar function can help with this, but I can't find any documentation on it.
Any help please?