Author Topic: animation pulse not working?  (Read 62 times)

popoklo

  • Jr. Member
  • **
  • Posts: 20
    • View Profile
animation pulse not working?
« on: October 08, 2017, 07:33:09 AM »
Ahoi!
try to do a pulsating selection Frame, it only runs once:

local flicker_anim = {
   when = When.Always,
    property = "alpha", time=300,
    start = 255, end = 0,
    loop = 1, pulse = 1
}

local frame2 = gamegrid_surface.add_image("frame.selected.2.png", 0, 0, 240 220); frame.alpha = 255;

animation.add( PropertyAnimation( frame2, flicker_anim ) );

does anyone had the Problem? or knows my fault?

thx!

kent79

  • Sr. Member
  • ****
  • Posts: 388
    • View Profile
Re: animation pulse not working?
« Reply #1 on: October 08, 2017, 11:13:35 PM »
Ahoi!
try to do a pulsating selection Frame, it only runs once:

local flicker_anim = {
   when = When.Always,
    property = "alpha", time=300,
    start = 255, end = 0,
    loop = 1, pulse = 1
}

local frame2 = gamegrid_surface.add_image("frame.selected.2.png", 0, 0, 240 220); frame.alpha = 255;

animation.add( PropertyAnimation( frame2, flicker_anim ) );

does anyone had the Problem? or knows my fault?

thx!


local flicker_anim = {
   when = When.Always,
    property = "alpha", time=300,
    start = 255, end = 0,
    loop = 1, pulse = 1
}

local frame2 = gamegrid_surface.add_image("frame.selected.2.png", 0, 0, 240 220); frame.alpha = 255;

animation.add( PropertyAnimation( frame2, flicker_anim ) );

Should be

frame2.alpha = 255?

 Actually, what is error log?

popoklo

  • Jr. Member
  • **
  • Posts: 20
    • View Profile
Re: animation pulse not working?
« Reply #2 on: October 15, 2017, 03:11:03 AM »
thx 4 your answer kent!

i tried everything. theres no error produced. cant get pulse working.
did a Workaround. Using TickCallback and check if Alpha is 0. then resetting to 255.
i dont like Workarounds. but ok.