Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Baro on Sun 02/11/2008 17:49:46

Title: Fadein and Fadeout while changing the background frame
Post by: Baro on Sun 02/11/2008 17:49:46
What I want to do is to fade out with background 0, and when the screen fades in again you see background 1.

One of the many codes I tried is:

  FadeOut(1);
  Wait(1);
  SetBackgroundFrame(1);
  Wait(1);
  FadeIn(1);

But sometimes during the fadeout, the background 1 jumps in. I've tried with longer waits and different  function order, but I never get the desired effect. Any idea?
Title: Re: Fadein and Fadeout while changing the background frame
Post by: Dualnames on Sun 02/11/2008 22:10:26
Well, I usually do this and it always works:
FadeOut(1);
  SetBackgroundFrame(1);
  Wait(1);
  FadeIn(1);