Constantly Scrolling Background Problem

Started by Postmodern Adventures, Wed 06/01/2021 12:27:13

Previous topic - Next topic
First o all, Hapy New Year to everyone!

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

Code: ags

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?


eri0o

#1
Use repeatedly_execute_always callback. :)

In your room Script, use:

Code: ags

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

It works! Thank you, eri0o! That was driving me crazy. Thank you, again!  ;)

SMF spam blocked by CleanTalk