Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Postmodern Adventures on Wed 06/01/2021 12:27:13

Title: Constantly Scrolling Background Problem
Post by: Postmodern Adventures on Wed 06/01/2021 12:27:13
First o all, Hapy New Year to everyone!

I have a constantly scrolling background using this code in room_RepExec:

Code (ags) Select

if (oroad.X > -Room.Width)
{
  oroad.X = oprueba.X -4;
}
else
{
  oroad.X = 0 ;
}


And i want to put two characters talking in this scene. But when one of them talks, the scrolls stops until the dialog ends. I supose the command Say blocks the constantly scroll code, but is there any way to avoid this?

Title: Re: Constantly Scrolling Background Problem
Post by: eri0o on Wed 06/01/2021 12:33:57
Use repeatedly_execute_always callback. :)

In your room Script, use:

Code (ags) Select

function repeatedly_execute_always()
{
  if (oroad.X > -Room.Width)
  {
    oroad.X = oprueba.X -4;
  }
  else
  {
    oroad.X = 0 ;
  }
}
Title: Re: Constantly Scrolling Background Problem [SOLVED]
Post by: Postmodern Adventures on Wed 06/01/2021 12:55:40
It works! Thank you, eri0o! That was driving me crazy. Thank you, again!  ;)