Page 1 of 1

Two things about cloneindex

PostPosted: Tue Jan 04, 2011 6:11 pm
by schnellboot
There must be something easier then this right?
Code: Select all
if(cloneindex==0)
{
    chosen=1;
}
if(cloneindex==1)
{
    chosen=2;
}
if(cloneindex==2)
{
    chosen=3;
}
if(cloneindex==3)
{
    chosen=4;
}
if(cloneindex==4)
{
    chosen=5;
}
if(cloneindex==5)
{
    chosen=6;
}
if(cloneindex==6)
{
    chosen=7;
}
if(cloneindex==7)
{
    chosen=8;
}
if(cloneindex==8)
{
    chosen=9;
}
if(cloneindex==9)
{
    chosen=10;
}
if(cloneindex==10)
{
    chosen=11;
}
if(cloneindex==11)
{
    chosen=12;
}


And also how do I acces the cloneindex from another actor?

Re: Two things about cloneindex

PostPosted: Tue Jan 04, 2011 6:57 pm
by skydereign
Code: Select all
chosen=cloneindex+1;


Accessing the cloneindex of another actor you can use this.
Code: Select all
chosen = actorName.cloneindex+1;


But that only works with the lowest cloneindex actor. You can sometimes use the creator/parent/collide actor references.

Re: Two things about cloneindex

PostPosted: Tue Jan 04, 2011 9:16 pm
by schnellboot
thanks!