EDIT ** Solved my own issue shortly after posting**
Used the code :
int trans = object[2].Transparency;
while (trans < 100) {
trans++;
object[2].Transparency = trans;
Wait(1);
}
I guess it was that rounding issue, changing to use < 100 in the code helped out.
Sorry for the needless post.
-Bill
-------------
I am having a bit of a problem fading an object out. I am basically fading an object in, waiting 4 seconds, then fading it out.
The object fades in fine, but I can't get it to fade out, and for the life of me, I don't see any problem with the code.. It is just reversing what the original did. I even tried other methods to fade in that I found in older forum posts, but nothing is working. Any help is appreciated..
CODE:
// FADE IN
object[2].Transparency = 100;
object[2].Visible=true;
int a =100;
while (a){
object[2].Transparency=a;
a--;
Wait(1);
}
// DONE FADING IN
Wait(160); // WAIT 4 SECONDS
//FADE OUT
while (a){
object[2].Transparency=a;
a++;
Wait(1);
}
object[2].Visible=false;
// END FADE OUT
Like I said, it fades the object in fine, but won't fade out. It just sits there waiting, then hits the visible=false command and the object vanishes.
Thanks in advance.
Bill
While(a) should be while (a<100)
Thanks SSH, I figured it out just before you posted a reply.
BTW: I love the overhotspot module you made up a while back :)
-Bill