Attract-Mode Support Forum

Attract-Mode Support => Scripting => Topic started by: gionni44 on February 20, 2018, 04:51:49 AM

Title: OVerlapping animations, how to stop it?
Post by: gionni44 on February 20, 2018, 04:51:49 AM
Hi guys, I'm working on my layout but when it start animations run simoultanesly.
The Transition.ToNewList doesn't stop when I press to change game and the result is overlapping the 2 animations.  :(
Is there a way to stop Transition.ToNewList when start Transition.ToNewSelection?

local panel = fe.add_image("white.png", 0, 0, flw*0.28, flh*1.00 );
panel.set_rgb( pR, pG, pB );
panel.alpha=paa;

   local plb_an1 = {
      when = Transition.ToNewSelection | Transition.ToNewList,
      property = "alpha"
      end = paa,
      time = 500,
   }
   local plb_an2 = {
      when = Transition.ToNewSelection | Transition.ToNewList,
      property = "alpha"
      start = paa,
      end = 255,
      time = 4000,
      delay = 5000,
   }
animation.add( PropertyAnimation( panel, plb_an1 ) );
animation.add( PropertyAnimation( panel, plb_an2 ) );


Thanks a lot !  :)