Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Etcher Squared Games on Sun 30/01/2005 14:56:54

Title: Getting Transparency [SOLVED]
Post by: Etcher Squared Games on Sun 30/01/2005 14:56:54
(First, if this is more of a Tech Forum Question I apologize, it seemed more appropriate here to me.  Otherwise feel free to move this thread.)

There appears to be no way to GetObjectTransparency.  I just wanted to make sure I didn't miss anything in the manual or these boards, but I cannot figure out how to do it. 

What I would like to accomplish is something like this:

repeat_execute()
{
  SetObjectTransparency(ITEM, GetObjectTransparency(ITEM) - 1);
}


I have a way to do it, since I know it's initial transparancy and can keep track of it in a global and edit the global one tick with every cycle.  But that code is getting a bit unclean. 

so basically I am:

repeat_execute()
{
  if (nFoo >= 0)   // as not to set transparency to a negative value
  {
    SetObjectTransparency(ITEM, nFoo);
    nFoo = nFoo - 1;
  }
}
Title: Re: Getting Transparency
Post by: Scorpiorus on Sun 30/01/2005 15:05:13
Yeah, currently there is no way to get object's transparency level but the workaround you provided should do the trick.

The next version of AGS will make it possible to get objects/characters/GUIs transparency values.