Objects: Fade In (SOLVED)

Started by Mugs, Mon 12/12/2005 02:46:55

Previous topic - Next topic

Mugs

I know how to make an object fade out, but how do I make an objectÃ,  fade in ?Ã,  ???
Cool stuff I found out: Men are four times more likely to be struck by lightning than women.  Wow, really? [dirty joke] Maybe this has to do with the fact that us men have "lightning rods"? [/dirty joke]

Gilbert

You faded it out using transparency settings right? Just do the loop in reverse order then it'll fade in.

It'll be better if You post your script for the fade out part, so we can direct you in how to modify it to do the reverse.

Mugs

Sorry, I didn't think about the different methods of object fading, I used the object transparency function, as described below

Code: ags

int trans = object[0].Transparency;
while (trans < 100) {
Ã,  trans++;
Ã,  object[0].Transparency = trans;
Ã,  Wait(1);

}




Cool stuff I found out: Men are four times more likely to be struck by lightning than women.  Wow, really? [dirty joke] Maybe this has to do with the fact that us men have "lightning rods"? [/dirty joke]

Gilbert

Obvious changes:
Code: ags

int trans = 100;
while (trans >0 100) {
Ã,  trans--;
Ã,  object[0].Transparency = trans;
Ã,  Wait(1);

}





Quote

Mugs

What I think you meant was this:

Code: ags

int trans = 100;
while (trans > 0) {
Ã,  trans--;
Ã,  object[0].Transparency = trans;
Ã,  Wait(1);

}

(Removing the "100" in "while (trans >0 100) {" )

Your script seems to be working, but now there's another problem. When I enter the screen, the object is completely visible for half a second, then it becomes completely invisble, then after that, it starts fadding in. How do I fix that ?




Cool stuff I found out: Men are four times more likely to be struck by lightning than women.  Wow, really? [dirty joke] Maybe this has to do with the fact that us men have "lightning rods"? [/dirty joke]

Gilbert

Yeah I made a typo.
Just put the following line in "Player enters room (before fade-in)":

object[0].Transparency = 100;

Mugs

Thanks Gilbot V7000a, again :P.Ã, Ã,  I didn't think about the "before fade-in" thing.Ã,  Anyways, everything seems to be working, but... for how long?
Cool stuff I found out: Men are four times more likely to be struck by lightning than women.  Wow, really? [dirty joke] Maybe this has to do with the fact that us men have "lightning rods"? [/dirty joke]

SMF spam blocked by CleanTalk