loadVars("vars", "vars");
switch(gameNumber)
{
case 0:
LoadGame("game0.ged");
break;
case 1: // current game
// do nothing
break;
case 2:
LoadGame("game2.ged");
break;
}
switch(cloneindex)
{
case 0:loadVars("score.txt", "sorokan"); stage.textNumber=kotak[0];
break;
case 1:loadVars("score.txt", "sorokan"); stage.textNumber=kotak[1];
break;
case 2:loadVars("score.txt", "sorokan"); stage.textNumber=kotak[2];
break;
case 3: loadVars("score.txt", "sorokan"); stage.textNumber=kotak[3];
break;
case 4:loadVars("score.txt", "sorokan"); stage.textNumber=kotak[4];
break;
case 5:loadVars("score.txt", "sorokan"); stage.textNumber=kotak[5];
break;
case 6:loadVars("score.txt", "sorokan"); stage.textNumber=kotak[6];
break;
case 7:loadVars("score.txt", "sorokan"); stage.textNumber=kotak[7];
break;
case 8:loadVars("score.txt", "sorokan"); stage.textNumber=kotak[8];
break;
case 9:loadVars("score.txt", "sorokan"); stage.textNumber=kotak[9];
break;
}
Actor *get;
char str[32];
sprintf(str,"stage.%i",cloneindex);
get=getclone(str); get->textNumber=kotak[cloneindex];
Actor *get;
// An Actor* is essentially a way of accessing an actor (Actor pointer)
char str[32];
// make a char array to hold the clonename (used by getclone)
sprintf(str,"stage.%i",cloneindex);
// set the char array equal to the clonename of the corresponding stage actor
// so, str = stage.cloneindex
get=getclone(str);
// set the Actor * get to the actor stage.cloneindex
get->textNumber=kotak[cloneindex];
// this is how you use an Actor *
// get->textNumber gives you the actor's textNumber
Users browsing this forum: No registered users and 1 guest