Re: How to make load game and save game functions in bgt?
Is there an operator which can redirect: x.y=2;
To end up as: x[y]=2
If so, you could probably make a dictionary. Then, all you gotta do to save and load is serialize it.
You might also be able to do something like this
dictionary data;
int counter=0;
class int_overloaded
{
key="";
int num=0;
int_overloaded()
{
counter++;
this.key="int"+counter+"";
data.set(key, this.num);
}
int opAssign(int val)
{
this.val=val;
}
//Redirect all the operators to access this.num, then, every time the value is changed, update the dictionary.
}
This might work, if someone or me wants to build it
-- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector