I have the following which works for the first item:
- Code: Select all
DestroyActor("glass.clonename");
clonename+1;
I thought just incrementing the clonename would work but its not for whatever reason.
+1 for the person that helps me out!
DestroyActor("glass.clonename");
clonename+1;
clonename+=1;
//First line:
int i=clonename;
//blabla
i+=1;
int i;
char buffer[30];
int i = 5;
sprintf(buffer, "glass.%d", i); // this makes the string hold glass.5
DestroyActor(buffer);
i++;
sprintf(buffer, "glass.%d", i); // glass.6
DestroyActor(buffer);
DestroyActor("Collide Actor");
void DestroyClone(char *actorName, int CloneIndex)
{
char *tmp;
sprintf(tmp, "%s.%d", actorName, CloneIndex);
DestroyActor(tmp);
}
DestroyClone("enemy", 5);
Users browsing this forum: No registered users and 1 guest