Page 1 of 1

Change trasparency ?

PostPosted: Sat Aug 08, 2009 9:02 am
by equinox
Hi at ALL,

Hi at ALL,

in script:

create EROE1-2-3

for change trsparency:

ChangeTrasparency(getclone2(EROE.name, 1),1.0000);
DestroyActor(getCloneIdx((EROE.name, 1),1.0000);
DestroyActor(getCloneIdx((EROE.name, 1),1.0000);

NOT WORK x 3.

Is there solution for this? Tnk1000.

Re: Change trasparency ?

PostPosted: Sat Aug 08, 2009 9:19 am
by skydereign
Well I am not sure what your code looks like... It would be helpful if you gave the actual code. By the looks of it you have three create actors, seemingly different but you are using getCloneIdx so you are dealing with clones, or at least three have been created, and then you want to change the transparency. The confusing part comes next, you want to change the transparency of only one actor, and then destroy the others? Also, why do you switch between getclone2 and getCloneIdx? Also, you are doing the code to the same clone, is that just because you retyped it or what? If you want to change the transparency of all of the three clones assuming they are, first clones start from 0, meaning you are dealing with 0-2 not 1-3. If you are not dealing with clones, than it does not matter and you can use their names.

This should work, assuming they are clones
Code: Select all
int i;
for(i=0;i<3;i++)
{
    ChangeTransparency(getCloneIdx("EROE", i), 1.0);
}