I just realized you cannot set the animation of clones using getclone ??
if this is true, then here is a function that will get around that.
it allows any actor to set the animation of any clone
to use: place the following function in a global script
then in ANY actor use the function as
animclone("clonename",cloneindex,"nameofanimation","DIRECTION")
where clonename,nameofanimation, and DIRECTION are enclosed in double quotes ( or strings vars)
and cloneindex is an int.
"DIRECTION" should be "STOPPED","BACKWARD", or "FORWARD"
example
animclone("ship",3, "explosion","FOWARD") // changes the animation of ship.1 to the explosion animation going forward..
if it doesn't make sense (or isn't needed, because there is a better way) let me know..
NOTE :Currently does NO checking, and ChangeAnimation() is very happy to process rubbish, so if your animations do not work, double check all your spelling..
feral
- Code: Select all
void animclone(char *actor,int i,char *name, char *dir)
{
char cloneID[50];
sprintf(cloneID,"%s.%i",actor,i);
if (strcmp(dir,"STOPPED")==0)
{
ChangeAnimation(cloneID, name,STOPPED);
}
if (strcmp(dir,"FORWARD")==0)
{
ChangeAnimation(cloneID, name,FORWARD);
}
if (strcmp(dir,"BACKWARD")==0)
{
ChangeAnimation(cloneID, name,BACKWARD);
}
}