For built in GE functions, must copy actor->clonename to a string, and run the function with that, as in the previous example.
For custom functions, this depends on the function you have created.
For instance,
void dosomething(Actor * this, int aa)}
}
Then call
dosomething(pact, pact->x);
Will work because you are inputting the declared variable type that the function requires.
Yes, this is the same Actor as all GE Actors, but they are temporary versions.
Also, you can call them by variable cloneindex if you use the getclone2 function (getclone1 needs specific cloneindex);
GetClone2 by Jazz-E-Bob
- Code: Select all
Actor *getclone2 ( char *actorName, long cloneNumber )
{
char resultString[256] = "";
char cloneNumberAsString[10];
Actor *resultActor;
strcpy ( resultString, actorName );
strncat ( resultString, ".", 1 );
sprintf (cloneNumberAsString, "%i", cloneNumber);
strncat ( resultString, cloneNumberAsString, 10 );
resultActor = getclone(resultString);
return resultActor;
}
then in a loop, you can use
pact=getclone2("pact", i);