Character customization
Posted: Wed Dec 05, 2012 2:18 pm
Hey guys, I was just wondering if any knows how you would create character customization via multiple animations and save/load variables.
I want an outside file that GE creates when you execute the save function.
void loadLvl()
{
int i;
FILE * lvlF;
lvlF=fopen(LoadSaveTag, "rb");
if(lvlF)
{
fread(STORAGE, sizeof(STORAGE), 1, lvlF);
i=ASIZE*6;
tACTORCOUNT = STORAGE[i];
oACTORCOUNT = STORAGE[i+1];
for(i=0; i<ASIZE-1; i++)
{
tAnim[i]=STORAGE[i];
oAnim[i]=STORAGE[i+ASIZE];
tX[i]=STORAGE[i+ASIZE*2];
tY[i]=STORAGE[i+ASIZE*3];
oX[i]=STORAGE[i+ASIZE*4];
oY[i]=STORAGE[i+ASIZE*5];
}
}
fclose(lvlF);
}
void saveLvl()
{
int i;
FILE * lvlF;
lvlF=fopen(LoadSaveTag, "wb");
if(lvlF)
{
for(i=0; i<ASIZE-1; i++)
{
STORAGE[i]=tAnim[i];
STORAGE[i+ASIZE]=oAnim[i];
STORAGE[i+ASIZE*2]=tX[i];
STORAGE[i+ASIZE*3]=tY[i];
STORAGE[i+ASIZE*4]=oX[i];
STORAGE[i+ASIZE*5]=oY[i];
}
i=ASIZE*6;
STORAGE[i]=tACTORCOUNT;
STORAGE[i+1]=oACTORCOUNT;
fwrite(STORAGE, sizeof(STORAGE), 1, lvlF);
}
fclose(lvlF);
}
+I live near you....
so which way are you wanting to do it in?
hmmm really where? if you dont mind?