Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: xenogia on Mon 15/09/2003 09:41:36

Title: Fading Text in and out with SetObjectTransparency
Post by: xenogia on Mon 15/09/2003 09:41:36
I am currently trying to get Credits to come up by fading in and out with objects.  Somehow it doesn't, it just pops up and doesn't fade in.  This is how I scripted it

ObjectOn (1); // Trinfinity Logo
         while (TCounter <= 100) {   
 Â             TCounter ++;            
             
           SetObjectTransparency (1, TCounter);   
        Wait (1);
          }

In the before fade-in script I set the transparency of the item to 0,
I am trying to get the loop routine to loop the transparency from 0 to 100, but it doesn't work.
Title: Re:Fading Text in and out with SetObjectTransparency
Post by: Gilbert on Mon 15/09/2003 10:15:00
hmmm I don't know if these are the problems, but:

1. For SetObjectTransparency(), 100 means completely invisible, while 0 means opaque, so if I (maybe I don't) understand what you want to do, you have to do the reverse, ie, from 100 down to 0, instead. So you had set it to 0 (completely visible) initially before fade-in, and coupling with that ObjectOn(1) line, it would ensure you got that "popup" effect of the object initially.

2. where did you put the posted portion of code? They can't be in the "before fadein" function, otherwise you'll see nothing.

3. I know this is a foolish question, but: Is your game a hicolour game ? Object transparency won't work for 256 coloured games.
Title: Re:Fading Text in and out with SetObjectTransparency
Post by: xenogia on Mon 15/09/2003 10:18:27
hehe, figured it out. just me not reading the documents properly..sorry about that