Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: SinSin on Thu 12/06/2008 21:12:36

Title: Fading a text overlay
Post by: SinSin on Thu 12/06/2008 21:12:36
Hello I have been trying to get a certain effect for my game and cannot work out the last bit Let me explain

Im using AGS 2.72 
When my character walks over a certain region i would like some text to fade on then hold for 4secs then fade off
  So far i have the following
#sectionstart region1_a
function region1_a() {
Overlay* myOverlay = Overlay.CreateTextual(50,80,120,2,15,"BlahBlahBlah");
Wait(160);
myOverlay.Remove();
  // script for Region 1: Player walks onto region
 
}
#sectionend region1_a   


obviously this makes the text appear but how do i stick the fades into the script
Title: Re: Fading a text overlay
Post by: GarageGothic on Thu 12/06/2008 21:20:19
Overlays don't support variable transparency, so you can't fade them. You could use a text label on a GUI to display the text instead and then fade the GUI by gradually changing it's transparency in repeatedly_execute.