Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: FredRosa on Fri 01/03/2013 18:01:55

Title: Transparency problem
Post by: FredRosa on Fri 01/03/2013 18:01:55
Hello,

Can someone help me with the following problem.
I want the legs of my character to become 50% transparent when in the back of the table glass.
(http://2.bp.blogspot.com/-vg_Hv_yJ6JM/UTDsvrVsV0I/AAAAAAAADxQ/rB3V1Y2Nc2Q/s1600/Help_Transparecy_Area.jpg)

Thanks.

Title: Re: Transparency problem
Post by: Khris on Fri 01/03/2013 18:09:31
Remove the glass from the background, then add it as Object and set its .Transparency to 50.
Title: Re: Transparency problem
Post by: FredRosa on Fri 01/03/2013 18:22:11
Thank you very much!
Title: Re: Transparency problem
Post by: Khris on Fri 01/03/2013 19:03:13
You're welcome :)

Also, you need to set the Object's baseline to a y coordinate in the area of the table's feet, so the object is properly display in front of / behind other objects and characters.
Title: Re: Transparency problem
Post by: FredRosa on Fri 01/03/2013 20:56:15
Well, since your hint I've been trying to put the object transparent and failed to do so... I'm starting to work with Script today.
I can only put him with a clickable or other kind of trigger and fade the object to the transparency I want. I used the code I found on the tutorial.
I can't make it just transparent from start. I bet that's really simple to do. :/
Title: Re: Transparency problem
Post by: Slasher on Fri 01/03/2013 21:49:57
In Room Load put this so the object is already transparent when Room fades in..

Code (AGS) Select

oghost.Transparency=95; // object name is oghost. Transparency is set to 95 which is almost invisible.


Simply change oghost to your object's name and set its transparency. 0 means none 100 means total transparency.

If you want to Fade objects In/out check out the Tween Module.


Title: Re: Transparency problem
Post by: FredRosa on Fri 01/03/2013 21:57:30
I get this message Parse error: unexpected 'oVidros' - my object name. :/
Title: Re: Transparency problem
Post by: FredRosa on Fri 01/03/2013 22:03:16
Oh I've understood it now! Thank you! I'm going to be a regular on this beginner help forum... :)